Displaying 12 results from an estimated 12 matches for "r_fopen".
2010 Mar 05
2
[PATCH] R ignores PATH_MAX and fails in long directories (PR#14228)
...SER");
FILE *fp;
fp = NULL;
@@ -72,7 +72,7 @@
return fp;
if((home = getenv("HOME")) == NULL)
return NULL;
- sprintf(buf, "%s/.Rprofile", home);
+ snprintf(buf, PATH_MAX, "%s/.Rprofile", home);
if((fp = R_fopen(buf, "r")))
return fp;
}
Index: src/main/startup.c
===================================================================
--- src/main/startup.c (revision 51208)
+++ src/main/startup.c (working copy)
@@ -52,10 +52,10 @@
attribute_hidden
FILE *R_OpenLibraryFile(const char...
2001 Feb 15
3
who frees dd and xd in X11_Open?
...n () (src/unix/X11/devX11.c):
/* if we have to bail out with "error", then must free(dd) and free(xd) */
A couple lines down, there is:
if (!strncmp(dsp, "png::", 5)) {
FILE *fp;
#ifndef HAVE_PNG
error("No png support in this version of R");
#endif
if (!(fp = R_fopen(R_ExpandFileName(dsp+5), "w")))
error("could not open PNG file `%s'", dsp+6);
...
So what does the comment imply? If error jumps out to the toplevel
without giving X11DeviceDriver a chance to free dd and xd, then this
should be:
if (!strncmp(dsp, "png::&...
1998 Oct 27
0
Unix R core dumps if $HOME is not set.
...process where the HOME environment variable is not set. When he
tries to run R all he gets is a core dump.
A regular user can verify this by just unsetting the HOME variable and
trying to run R.
The problem is in the system.c file, in the following lines,
if (LoadInitFile) {
if ((fp = R_fopen(".Rprofile", "r")))
return fp;
sprintf(buf, "%s/.Rprofile", getenv("HOME"));
if ((fp = R_fopen(buf, "r")))
return fp;
}
I won't suggest a fix (because everyone has their favorite ways of
dancing around error returns from...
1999 Nov 04
1
R_OpenSiteFile: Do not use a null ptr as filename in fopen (PR#312)
I get crashes when I call R without any arguments and having no
environment variables R_PROFILE and RPROFILE.
The reason is, that in unix/sys-common.c in R_OpenSiteFile() fopen
is called with a null ptr as filename (because this is the outcome
of getenv()).
Although most compilers seem to interpret this as "file not found",
this is an undefined behavior concerning to all C standards
2016 Nov 13
1
Memory leak with tons of closed connections
...ose() on the connection
when it is closed) indeed fixes the memory leak.
FYI,
Gabor
Index: src/main/connections.c
===================================================================
--- src/main/connections.c (revision 71653)
+++ src/main/connections.c (working copy)
@@ -576,7 +576,7 @@
fp = R_fopen(name, con->mode);
} else { /* use file("stdin") to refer to the file and not the console */
#ifdef HAVE_FDOPEN
- fp = fdopen(0, con->mode);
+ fp = fdopen(dup(0), con->mode);
#else
warning(_("cannot open file '%s': %s"), name,
"fdopen is n...
2001 Sep 06
2
file.copy() problems on WinNT (PR#1085)
For some files, file.copy() doesn't copy these files correctly.
Here you will find a file (Bitmap, 769Kb) to reproduce the problem:
http://www.statistik.uni-dortmund.de/leute/ligges/R/test1.bmp
Using
file.copy("c:/test1.bmp", "c:/test2.bmp", overwrite = TRUE)
produces a second file with the size of ~1.4 Mb:
http://www.statistik.uni-dortmund.de/leute/ligges/R/test2.bmp
2011 Jan 05
1
rShowMessage "Fatal error: unable to open the base package
Hi All,
As you may know I am trying connect R with java by RJava, now I run the
examples, I got this error
rShowMessage "Fatal error: unable to open the base package
I am using 64bits windows 7 and eclipse. Any suggestions?
Many thanks
Ying
[[alternative HTML version deleted]]
1999 Jan 27
0
load() patch
...nment parameter so that the
+ // loaded objects can be placed where desired
+ aenv = CADR(args);
+ if (TYPEOF(aenv) != ENVSXP && aenv != R_NilValue)
+ error("invalid envir argument\n");
/* Process the saved file to obtain a list of saved objects. */
+
fp = R_fopen(CHAR(STRING(CAR(args))[0]), "rb");
if (!fp)
errorcall(call, "unable to open file\n");
@@ -1162,7 +1169,7 @@
PROTECT(a = ans);
while (a != R_NilValue) {
- for (e = FRAME(R_GlobalEnv); e != R_NilValue ; e = CDR(e)) {
+ for (e = FRAME(aenv); e != R_NilValue ; e =...
2004 Mar 13
0
64bit build on IBM
...ROR: Undefined symbol: .removeInputHandler
ld: 0711-317 ERROR: Undefined symbol: .Rf_devNumber
ld: 0711-317 ERROR: Undefined symbol: .Rf_KillDevice
ld: 0711-317 ERROR: Undefined symbol: .GEplayDisplayList
ld: 0711-317 ERROR: Undefined symbol: .R_ExpandFileName
ld: 0711-317 ERROR: Undefined symbol: .R_fopen
ld: 0711-317 ERROR: Undefined symbol: .Rf_asLogical
ld: 0711-317 ERROR: Undefined symbol: .addInputHandler
ld: 0711-317 ERROR: Undefined symbol: .Rprintf
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
unlink: /ptmp/thoar/xlcW0t0bjqa
unlink: /ptmp/thoar/xlcW1tBbjqb
un...
2016 Nov 11
2
Memory leak with tons of closed connections
On Fri, Nov 11, 2016 at 12:08 PM, Martin Maechler
<maechler at stat.math.ethz.ch> wrote:
>>>>>> Gergely Dar?czi <daroczig at rapporter.net>
>>>>>> on Thu, 10 Nov 2016 16:48:12 +0100 writes:
>
> > Dear All,
> > I'm developing an R application running inside of a Java daemon on
> > multiple threads, and
1999 Aug 03
2
compliation problem
Problem compiling R.
version: 0.64.2
machine: SGI O2
OS: IRIX6.5
CC cc
FC f77
MAKE GNU make 3.75
Here is part of the the output for make.
make[2]: Leaving directory `/usr/people/faculty/math/mgass/stage/R/R-0.64.2/src/include'
make[2]: Entering directory `/usr/people/faculty/math/mgass/stage/R/R-0.64.2/src/appl'
cc -g -OPT:IEEE_NaN_inf=ON -I../include
2002 Jul 11
1
dyn.load tcl/tk (PR#1774)
...rning: Unresolved:
getSelectedHandler
R_InputHandlers
R_PolledEvents
R_wait_usec
R_NaInt
Rf_error
Rf_warning
Rprintf
REprintf
R_ExpandFileName
R_NilValue
Rf_allocVector
Rf_asInteger
Rf_asLogical
Rf_GetOption
Rf_install
Rf_isString
Rf_length
Rf_protect
Rf_unprotect
R_Consolefile
R_Busy
Rf_checkArity
R_fopen
init_con
R_setInternetRoutines
dummy_vfprintf
gmake[5]: Entering directory `/soft/R/R-1.5.1/src/modules/internet'
gmake[5]: Leaving directory `/soft/R/R-1.5.1/src/modules/internet'
gmake[4]: Leaving directory `/soft/R/R-1.5.1/src/modules/internet'
gmake[3]: Leaving directory `/soft/R/R-...