similar to: Dealing with printf() &c. in third-party library code

Displaying 20 results from an estimated 4000 matches similar to: "Dealing with printf() &c. in third-party library code"

2007 Apr 12
1
printf capture
printf capture Dear All, I'm running R-2.4.1 on WindowsXP. I wrote a small C++ DLL using Rprintf() and all works fine dyn.load(), is.loaded('f1'), Rprintf(), .C(), all is ok. Now, the worry : I use also a 3rd party piece of C++ program which was not designed for R and uses printf(). I though on sink(...) before .C('f1'), but it doesn't work. I call
2012 Dec 03
1
Compilation failure on Solaris: any advice?
Dear all, The current version of my RNiftyReg package is failing to compile on CRAN's Solaris testbed, but I don't have access to a Solaris system to debug on, and Googling the error hasn't been very helpful. The error is CC -library=stlport4 -I/home/ripley/R/cc/include -DNDEBUG -DNDEBUG -DRNIFTYREG -I/usr/local/include -KPIC -O -xlibmil -xtarget=native -nofstore -c niftyreg.cpp
2007 Feb 07
3
Redirect --stats to STDERR.
Hello, I have written a little script that's would email me all errors. rsync -vah --delete --stats <sources> <destination> > /var/log/sauvegarde/listoffile.log 2> /var/log/sauvegarde/errors.log My problem is i want to have the stats in my mail. Is it possible to redirect --stats to STDERR. I have tryed to do this : /---
2004 Jan 27
1
Differentiating debug messages from both sides
Some of the debug messages that rsync outputs (when verbose >= 2) can occur on both sides of the connection. This makes it hard to know which program is saying what. Some debug messages deal with this by outputting a "[PID]" string at the start of the message. Unfortunately, the startup message that tells us which pid is which is only output when verbose >= 3, so there's a
2009 Jun 12
1
Can't get F77_CALL(dgemm) to work [SEC=UNCLASSIFIED]
Hi I am new to writing C code and am trying to write an R extension in C. I have hit a wall with F77_CALL(dgemm) in that it produces wrong results. The code below is a simplified example that multiplies the matrices Ab and Bm to give Cm. The results below show clearly that Cm is wrong. Am= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Bm= 1 1 1 1 1
2002 Aug 05
5
[patch] read-devices
Greetings, I'd like to propose a new option to rsync, which causes it to read device files as if they were regular files. This includes pipes, character devices and block devices (I'm not sure about sockets). The main motivation is cases where you need to synchronize a large amount of data that is not available as regular files, as in the following scenarios: * Keep a copy of a block
2002 May 04
1
A simpler move-files patch
In an effort to get my long-desired move-files functionality into rsync, I have created a version of my patch that runs as an extra pass at the end of the processing. This results in a simpler set of changes to rsync. I still think it would be nice to have incremental deletions during large transfers (as my first patch provides), but acceptance of this patch would relegate such quibbling to a
2017 Jun 30
1
Rprintf expected encoding
I'm trying to find information about how to use Rprintf with a UTF-8 encoded string, and I'm not sure what the right cross-platform usage is. I found an earlier thread about this (http://r.789695.n4.nabble.com/How-to-print-UTF-8-encoded-strings-from-a-C-routine-to-R-s-output-td4724337.html) but it wasn't very helpful. If I want to print a UTF-8 string, I can do one of the
2015 Feb 05
2
Invalid read of size 8
Hi, I have a R program that call a C function. I define a vector of pointer as int nLC=3; int pownLC = nLC*nLC double *MatCovExtra[nT+1]; for(k=0;k<K+1;k++) { MatCovExtra[k] = (double*)R_alloc(pownLC, sizeof(double)); } where nT>K. Then i put some values on the vector associated with the pointer: for(k=0;k<K+1;k++) { for(i=0;i<nLC;i++)
2002 Jun 21
1
small security-related rsync extension
Included below is a shar archive containing two patches that together: 1) make backup files get their setuid and setgid bits stripped by default 2) add a "-s" option that allows backup files to continue to have these privileges This means that if you update a collection of binaries with rsync, and one or more of them has a local-root security problem, the backup file(s) created when
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
Please CC me directly as i'm not on the list. I have attached a patch against latest CVS (cvs diff -u) that adds the following functionality. I can break it up if you would prefer it in pieces. Comments welcome. o add compare-perms option This creates a new inode for a file even if only the perms have changed. This way if a file outside of destdir is hardlinked to a dentry inside
2010 Apr 05
2
Rprintf not updating
Hello all, I am using Rprintf in a C for loop (from .Call) to print a progress indicator showing the current percent complete. The loop I am doing is an time intensive call to another function. I have noticed that Rprintf does not print to the R-window until the entire loop has been completed. When it reaches the end of the loop it suddenly prints 0 percent to 100 percent in a split second.
2009 Feb 08
2
Strange behavior of C compiled program
Hi the list, I need to include some C code in R, but the behavior of the C code is strange : Here is my code : --- 8< --- Rprintf("\n XXXX mTraj=%f mClus=%f",mTraj[i+nbId*c],mClustersCenter[j+nbClusters*c]); Rprintf("\nDistA=%d Tmp=%d",dist,tmp); tmp = mTraj[i+nbId* c] - mClustersCenter [j+nbClusters* c]; Rprintf("\nDistB=%d
2008 Jul 20
1
garbage collection, "preserved" variables, and different outcome depending on "--verbose" or not
Dear list, While trying to identify the root of a problem I am having with garbage collected variables, I have come across the following oddity: depending on whether --verbose is set or not, I obtain different results. I have made a small standalone example to demonstrate it. The example is very artificial, but I had a hard time reproducing reliably the problem. So when I do: (the content of
2005 Apr 02
2
Building new graphic device drivers with g++
Dear Group, I'm trying to build a set of new graphic device drivers. I use the devNull example a a beginning point: $ R CMD SHLIB devNull.c gcc -shared -L/usr/local/lib -o devNull.so devNull.o (everything works OK) $ R CMD SHLIB devNull.cpp g++ -shared -L/usr/local/lib -o devNull.so devNull.o (everything works OK) The difficulties start when trying to compile manually. I compile the
2010 Jan 23
1
matrix to a C function
Hi the list, Is there a way to give a matrix to a C function, and then to use it as a matrix ? I write a function to print a matrix, but I use it as a vector : 1. void printMatrix(double *mTraj,int *nbCol, int *nbLigne){ 2. int i=0,j=0; 3. for(i=0 ; i < *nbLigne ; i++){ 4. for(j=0 ; j < *nbCol ; j++){ 5. Rprintf(" %f",mTraj[i * *nbCol + j]); 6. } 7.
2001 Nov 29
1
patch from faith@alephnull to add rate indicator to --progress
Any votes for/against? ----- Forwarded message from Rik Faith <faith@alephnull.com> ----- Date: Wed, 28 Nov 2001 12:55:29 -0500 From: Rik Faith <faith@alephnull.com> To: mbp@samba.org Subject: rsync patch X-Mailer: VM 6.96; XEmacs 21.1; Linux 2.4.16 (light) Here is a patch that adds rate information (e.g., kB/s) to the --progress display. I just noticed that 2.4.7pre4 is coming
2012 Apr 11
0
Significant updates to medical imaging packages: TractoR and RNiftyReg
Dear all, There have been some recent major updates to the TractoR and RNiftyReg packages, which are available for medical image analysis applications. If you use R for these purposes, I hope you will find the updates useful. RNiftyReg is an image registration package, which provides a clean R-like interface to the NiftyReg library developed at University College London [1]. It is aimed at
2012 Apr 11
0
Significant updates to medical imaging packages: TractoR and RNiftyReg
Dear all, There have been some recent major updates to the TractoR and RNiftyReg packages, which are available for medical image analysis applications. If you use R for these purposes, I hope you will find the updates useful. RNiftyReg is an image registration package, which provides a clean R-like interface to the NiftyReg library developed at University College London [1]. It is aimed at
2001 Nov 13
2
direct write patch
I have attached a patch that supports a new "--direct-write" option. The result of using this option is to write directly to the destination files, instead of a temporary file first. The reason this patch is needed is for rsyncing to a device where the device is full or nearly full. Say that I am writing to a device that has 1 Meg free, and a 2 meg file on that device is out of date.