X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/bc2e93eb8e6562590492e39349b37c38711a05ce..f0fca04e4e136c4a487a922e8fb09acf46aeafa0:/util.c diff --git a/util.c b/util.c index 59f94182..f74228ef 100644 --- a/util.c +++ b/util.c @@ -446,58 +446,3 @@ void kill_all(int sig) } } -/* this is the rsync debugging function. Call it with FINFO or FERROR */ -void rprintf(int fd, const char *format, ...) -{ - va_list ap; - char buf[1024]; - int len; - FILE *f=NULL; - - va_start(ap, format); - -#if HAVE_VSNPRINTF - len = vsnprintf(buf, sizeof(buf)-1, format, ap); -#else - len = vsprintf(buf, format, ap); -#endif - va_end(ap); - - if (len < 0) exit_cleanup(1); - - if (fd == FERROR) { - f = stderr; - } - - if (fd == FINFO) { - extern int am_server; - if (am_server) - f = stderr; - else - f = stdout; - } - - if (!f) exit_cleanup(1); - - if (fwrite(buf, len, 1, f) != 1) exit_cleanup(1); -} - -void rflush(int fd) -{ - FILE *f = NULL; - - if (fd == FERROR) { - f = stderr; - } - - if (fd == FINFO) { - extern int am_server; - if (am_server) - f = stderr; - else - f = stdout; - } - - if (!f) exit_cleanup(1); - fflush(f); -}