search for: rprintf

Displaying 20 results from an estimated 453 matches for "rprintf".

Did you mean: sprintf
2007 Feb 07
3
Redirect --stats to STDERR.
...01:46:32.000000000 +0200/ /+++ rsync-2.6.9.new/main.c 2007-02-06 19:28:08.000000000 +0100/ /@@ -227,39 +227,39 @@/ / {/ / if (do_stats) {/ / rprintf(FCLIENT, "\n");/ /- rprintf(FINFO,"Number of files: %d\n", stats.num_files);/ /- rprintf(FINFO,"Number of files transferred: %d\n",/ /+...
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 U...
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 l...
2004 Jan 27
1
Differentiating debug messages from both sides
...27,7 @@ #include "rsync.h" extern int verbose; +extern char *who_am_i; struct exclude_struct **exclude_list; struct exclude_struct **local_exclude_list; @@ -102,7 +103,7 @@ void free_exclude_list(struct exclude_st struct exclude_struct **list = *listp; if (verbose > 2) - rprintf(FINFO,"clearing exclude list\n"); + rprintf(FINFO, "[%c] clearing exclude list\n", *who_am_i); if (!list) return; @@ -203,12 +204,14 @@ static void report_exclude_result(char c * then it is stripped out by make_exclude. So as a special * case we add it back in her...
2009 Jun 12
1
Can't get F77_CALL(dgemm) to work [SEC=UNCLASSIFIED]
...ec + j * cols_B; for (j = 0; j < rows_C; j++) Cm[j] = Cm_vec + j * cols_C; for (r = 0; r < rows_A; r++) for (c = 0; c < cols_A; c++) { Am[r][c] = r*(cols_A) + c + 1.0; }; for (r = 0; r < rows_B; r++) for (c = 0; c < cols_B; c++) Bm[r][c] = 1.0; Rprintf("\n\n Am= \n"); for (r = 0; r < rows_A; r++) for (c = 0; c < cols_A; c++) if (c==(cols_A - 1)) Rprintf("%2.0f \n" ,(double) Am[r][c]); else Rprintf("%2.0f ",(double) Am[r][c]); Rprintf("\n\n Am_vec= \n"); for (r = 0; r <...
2002 Aug 05
5
[patch] read-devices
...+ if (read_devices) + csum_length = MIN(8,SUM_LENGTH); + /* Because streams must succeed on first attempt. This is a protocol change! + It would be better to allow checksum lengths to differ between files. #ET# XXX */ + else + csum_length = 2; + } else + csum_length = SUM_LENGTH; + rprintf(FINFO, "#ET# csum_length=%d\n", csum_length); } @@ -171,9 +176,9 @@ } void sum_end(char *sum) { - if (sumresidue) { + if (sumresidue) { /* remove the test to address http://lists.samba.org/pipermail/rsync/2002-August/008011.html */ mdfour_update(&md, (uchar *)sumrbuf, s...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
....6-filtered/options.c 2003-11-16 14:06:29.000000000 +0100 @@ -48,6 +48,9 @@ int dry_run=0; int local_server=0; int ignore_times=0; +char *source_filter = NULL; +char *dest_filter = NULL; +int times_only=0; int delete_mode=0; int delete_excluded=0; int one_file_system=0; @@ -246,6 +249,7 @@ rprintf(F," --timeout=TIME set IO timeout in seconds\n"); rprintf(F," -I, --ignore-times don't exclude files that match length and time\n"); rprintf(F," --size-only only use file size when determining if a file should be transferred\n...
2002 May 04
1
A simpler move-files patch
...ut here--->8------>8------>8------>8--- Index: options.c --- save/options.c Sat May 4 11:22:22 2002 +++ options.c Sat May 4 11:27:17 2002 @@ -86,6 +86,7 @@ int modify_window=0; #endif int blocking_io=-1; +int move_files=0; /** Network address family. **/ @@ -240,6 +241,7 @@ rprintf(F," --delete-after delete after transferring, not before\n"); rprintf(F," --ignore-errors delete even if there are IO errors\n"); rprintf(F," --max-delete=NUM don't delete more than NUM files\n"); + rprintf(F," --...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...shfiles(char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the larg...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...shfiles(char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the larg...
2008 Apr 16
1
C++ complains abouct Rprintf signature
Dear R-devel, My g++ complains about the first argument to Rprintf being non-const char *. For example when compiling the line Rprintf("hello world\n"); the following warning is emitted: warning: deprecated conversion from string constant to 'char*' Is there a reason for the non-const? It is curious that Rf_error, which is similar to RPrintf...
2015 Feb 05
2
Invalid read of size 8
...i++) { for(j=i;j<nLC;j++) { MatCovExtra[k][i*nLC+j] = startSigma[i*nLC+j]; } } } and i check that everithing is ok with for(k=0;k<K+1;k++) { Rprintf("First Cov Extra %i \n",k); for(i=0;i<nLC;i++) { for(j=i;j<nLC;j++) { Rprintf("%f ", MatCovInv[k][i*nLC+j]); } Rprintf("\n"); }...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...shfiles(char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the larg...
2011 Nov 28
0
RFC: [PATCH] Add TCP congestion control and Diffserv options
...9,8 @@ int delete_during = 0; int delete_before = 0; int delete_after = 0; int delete_excluded = 0; +int diffserv = 8; +char *congestion_alg = NULL; int remove_source_files = 0; int one_file_system = 0; int protocol_version = PROTOCOL_VERSION; @@ -776,6 +778,8 @@ void usage(enum logcode F) rprintf(F," --address=ADDRESS bind address for outgoing socket to daemon\n"); rprintf(F," --port=PORT specify double-colon alternate port number\n"); rprintf(F," --sockopts=OPTIONS specify custom TCP options\n"); + rprintf(F,"...
2001 Apr 04
1
Rprintf under windows?
Hi, I've been using Rprintf from a shared library compiled under various unix flavour for a while now. I get a warning about Rprintf being undefined when constructing the library, but everything works OK after loading. I've also been cross compiling the same library using the mingw32 tools for a while now, but the inclus...
2004 Apr 27
1
rsync-2.6.1 close() fixes
...le_id; extern int ignore_errors; extern int orig_umask; +extern int do_fsync; static void delete_one(char *fn, int is_dir) { @@ -268,6 +269,12 @@ static int receive_data(int f_in,struct exit_cleanup(RERR_FILEIO); } + if (do_fsync && (fd != -1) && (fsync(fd) != 0)) { + rprintf(FERROR, "fsync failed on %s: %s\n", + full_fname(fname), strerror(errno)); + exit_cleanup(RERR_FILEIO); + } + sum_end(file_sum1); read_buf(f_in,file_sum2,MD4_SUM_LENGTH); @@ -458,7 +465,11 @@ int recv_files(int f_in,struct file_list if (fd1 != -1) { close(fd1); } - clo...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch? Thanks for the reminder. I've just committed Jos's rsync+ patch onto the "branch_mbp_rsyncplus_merge" branch. If it works OK and nobody screams I will move it across onto the main tree tomorrow or Wednesday. I see the patch doesn't add documentation about the new options to the man page, so we should fix that in the future.
2002 Jun 21
1
small security-related rsync extension
...****** X*** 29,34 **** X--- 29,56 ---- X extern int preserve_devices; X extern int preserve_links; X extern int preserve_hard_links; X+ extern int priv_backups; X+ X+ #ifdef HAVE_CHMOD X+ static int strip_perm(char *fname) X+ { X+ struct stat buf; X+ if (link_stat(fname,&buf) != 0) { X+ rprintf(FERROR,"stat failed\n"); X+ return 0; X+ } X+ X+ if (S_ISREG(buf.st_mode) && (buf.st_mode & (S_ISUID | S_ISGID))) { X+ mode_t new_mode; X+ new_mode = buf.st_mode & 01777; X+ if (do_chmod(fname,new_mode) != 0) { X+ rprintf(FERROR,"chmod failed\n"); X...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...s checksum is set then we use the checksum instead of the file time to determine whether to sync */ @@ -352,6 +363,17 @@ statret = -1; if (statret == -1) errno = saveerrno; +#if HAVE_LINK + else if (link_dest) + if (do_link(fnamecmpbuf, fname) != 0) { + if (verbose > 0) + rprintf(FINFO,"link %s => %s : %s\n", + fnamecmpbuf, + fname, + strerror(errno)); + fnamecmp = fnamecmpbuf; + } +#endif else fnamecmp = fnamecmpbuf; } Index: options.c =================================================================== RCS file: /cvsroot/rsync/options.c...
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 Tmp=%d",dist,tmp); dist += (tmp * tmp...