search for: copy_to_user_str

Displaying 10 results from an estimated 10 matches for "copy_to_user_str".

2012 Mar 21
1
Trouble installing the XML package
..._RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1 -I. -DLIBXML2=1 -fpic -g -O2 -c DocParse.c -o DocParse.o In file included from DocParse.c:13: Utils.h:230:2: warning: #warning "Redefining COPY_TO_USER_STRING to use encoding from XML parser" gcc -std=gnu99 -I/usr/share/R/include -DLIBXML -I/usr/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_H...
2012 Oct 13
0
XML_3.95-0.1.tar.gz does not build on FreeBSD
...=1 -D_R_=1 -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1 -I. -DLIBXML2=1 -I/usr/local/include -fpic -O2 -pipe -O2 -fno-strict-aliasing -pipe -msse3 -Wl,-rpath=/usr/local/lib/gcc46 -c DocParse.c -o DocParse.o In file included from DocParse.c:13:0: Utils.h:230:2: warning: #warning "Redefining COPY_TO_USER_STRING to use encoding from XML parser" [-Wcpp] gcc46 -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG -DR_HAS_REMOVE_FINALIZERS=1 -DLIBXML -I/usr/local/include/libxml2 -I/usr/local/include -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE...
2000 Apr 01
1
Bug ? mine or ? in R core
...ECT(ans=NEW_LIST(2)); /*create answer [0] = data, [1]=stat */ PROTECT(stat=NEW_INTEGER(1)); /* numeric status vector */ PROTECT(data=NEW_CHARACTER(buffsize)); while(1){ for (i=1; i<= NCOLS; i++){ offset=((i-1)*maximum)+(j-1); } DBG(2,"writing to data"); STRING(data)[offset]=COPY_TO_USER_STRING("Some dummy data"); if(offset +NCOLS >= buffsize){ DBG(1,"reallocating space"); length=length(data); buffsize=length+buffsize; SET_LENGTH(data,buffsize); } j++; if(maximum && j>maximum) break; } /* transpose it */ DBG(1,"trimming"...
2003 Dec 10
0
C++: SET_LENGTH() Over Many Iterations?
...t;, i + 1); if (full_alloc) INTEGER_POINTER(int_vect)[i] = i; else PUSH_BACK_INTEGER(int_vect, i); } SEXP out, names, cls; PROTECT(out = NEW_LIST(1)); SET_VECTOR_ELT(out, 0, int_vect); PROTECT(names = NEW_CHARACTER(1)); SET_STRING_ELT(names, 0, COPY_TO_USER_STRING("integer.vector")); SET_NAMES(out, names); PROTECT(cls = NEW_CHARACTER(1)); SET_STRING_ELT(cls, 0, COPY_TO_USER_STRING("pushback")); classgets(out, cls); UNPROTECT(6); return out; } </CPP Code> <R Code> nreps=50000 allocate=FALSE...
2009 Nov 27
1
Build of XML package failed
...gz package both with install.packages('XML', dep=T) from within R and the R CMD INSTALL using a local tar.gz file. I am having the following error message (sorry it is partly in french): Dans le fichier inclus ? partir de DocParse.c:13: Utils.h:175:2: attention : #warning "Redefining COPY_TO_USER_STRING to use encoding from XML parser" DocParse.c: In function ?notifyError?: DocParse.c:1051: erreur: le format n'est pas une cha?ne litt?rale et pas d'argument de format This last error message means: "error: format not a string literal and no format arguments" In the past w...
2004 Aug 18
3
R as shared library
...ETCAR(R_source_fun, Rf_install("source")); SETCAR(CDR(R_source_fun), R_source_arg = NEW_CHARACTER(1)); Then each request is serviced by the following code: /* r is apache request, r->filename is url translated to apsolute path to filename */ SET_STRING_ELT(R_source_arg, 0, COPY_TO_USER_STRING(r->filename)); errorOccurred=1; /* R code: source(filename) */ val = R_tryEval(R_source_fun,NULL,&errorOccurred); if (errorOccurred){ // Send a message to stderr (apache redirects this to the error log) fprintf(stderr,"apache2_mod_R: source(%s) failed!\n",r->f...
2003 Dec 12
3
C++: Appending Values onto an R-Vector.
Hi folks. I posted this question a few days ago, but maybe it got lost because of the code I included with it. I'm having a problem using the SET_LENGTH() macro in an R extension I'm writing in C++. In a function within the extension I use SET_LENGTH() to resize R vectors so as to allow the concatenation of single values onto the vectors -- it's a "push back" function to
2004 Apr 06
1
A question about embedded R
...range problem when I call R expression from C++, here is the details: I edited a function eval_R_command(); double eval_R_command(const char *funcName) { SEXP exp,e; ParseStatus status = PARSE_OK; int i,n; double val; PROTECT(exp=NEW_CHARACTER(1)); SET_STRING_ELT(exp, 0, COPY_TO_USER_STRING(funcName)); PROTECT(e = R_ParseVector(exp, 1, &status)); n = GET_LENGTH(e); for(i = 0; i < n ; i++) val = (double)REAL(eval(VECTOR_ELT(e,i), R_GlobalEnv))[0]; UNPROTECT(2); return(val); } Then if i call with eval_R_command("mean(1:5)") it worke...
2005 Jul 15
3
Passing character strings from C code to R
Hi, I have a C code which produces array of integers and potentially a string, and I have problems passing the string out. Here is the relevant part of the code: 1 PROTECT(Ret = allocVector(INTSXP, n)); 2 ret = (int*) INTEGER(Ret); /* get pointer to R's Ret */ 3 for(i=0; i<n; i++) ret[i] = data[i]; 4 Free(data); 5 i=1; 6 if (comment) { // comment was found 7 n
2005 Jul 15
3
Passing character strings from C code to R
Hi, I have a C code which produces array of integers and potentially a string, and I have problems passing the string out. Here is the relevant part of the code: 1 PROTECT(Ret = allocVector(INTSXP, n)); 2 ret = (int*) INTEGER(Ret); /* get pointer to R's Ret */ 3 for(i=0; i<n; i++) ret[i] = data[i]; 4 Free(data); 5 i=1; 6 if (comment) { // comment was found 7 n