From b64ee91a4138babc77ea06bb48bdad327a8b99b3 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 1 Jun 2006 08:04:47 +0000 Subject: [PATCH] Changed rprintf() messages that started with a newline into two rprintf() calls (the first of which just outputs an empty line). --- main.c | 13 ++++++++----- options.c | 21 ++++++++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/main.c b/main.c index 21111f11..3e190956 100644 --- a/main.c +++ b/main.c @@ -223,7 +223,8 @@ static void handle_stats(int f) static void output_summary(void) { if (do_stats) { - rprintf(FINFO,"\nNumber of files: %d\n", stats.num_files); + rprintf(FCLIENT, "\n"); + rprintf(FINFO,"Number of files: %d\n", stats.num_files); rprintf(FINFO,"Number of files transferred: %d\n", stats.num_transferred_files); rprintf(FINFO,"Total file size: %s bytes\n", @@ -250,8 +251,9 @@ static void output_summary(void) } if (verbose || do_stats) { + rprintf(FCLIENT, "\n"); rprintf(FINFO, - "\nsent %s bytes received %s bytes %s bytes/sec\n", + "sent %s bytes received %s bytes %s bytes/sec\n", human_num(total_written), human_num(total_read), human_dnum((total_written + total_read)/(0.5 + (endtime - starttime)), 2)); rprintf(FINFO, "total size is %s speedup is %.2f\n", @@ -274,7 +276,8 @@ static void show_malloc_stats(void) mi = mallinfo(); - rprintf(FINFO, "\n" RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n", + rprintf(FCLIENT, "\n"); + rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n", getpid(), am_server ? "server " : "", am_daemon ? "daemon " : "", who_am_i()); rprintf(FINFO, " arena: %10ld (bytes from sbrk)\n", @@ -410,8 +413,8 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char *path, if (verbose > 3) { for (i = 0; i < argc; i++) - rprintf(FINFO, "cmd[%d]=%s ", i, args[i]); - rprintf(FINFO, "\n"); + rprintf(FCLIENT, "cmd[%d]=%s ", i, args[i]); + rprintf(FCLIENT, "\n"); } if (read_batch) { diff --git a/options.c b/options.c index 04a5654e..f5b56391 100644 --- a/options.c +++ b/options.c @@ -252,7 +252,8 @@ static void print_rsync_version(enum logcode f) (int) SIZEOF_INT64, (int) sizeof (int64)); } - rprintf(f,"\nrsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"); + rprintf(f,"\n"); + rprintf(f,"rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n"); rprintf(f,"are welcome to redistribute it under certain conditions. See the GNU\n"); rprintf(f,"General Public Licence for details.\n"); } @@ -262,10 +263,12 @@ void usage(enum logcode F) { print_rsync_version(F); - rprintf(F,"\nrsync is a file transfer program capable of efficient remote update\n"); + rprintf(F,"\n"); + rprintf(F,"rsync is a file transfer program capable of efficient remote update\n"); rprintf(F,"via a fast differencing algorithm.\n"); - rprintf(F,"\nUsage: rsync [OPTION]... SRC [SRC]... DEST\n"); + rprintf(F,"\n"); + rprintf(F,"Usage: rsync [OPTION]... SRC [SRC]... DEST\n"); rprintf(F," or rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST\n"); rprintf(F," or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST\n"); rprintf(F," or rsync [OPTION]... SRC [SRC]... rsync://[USER@]HOST[:PORT]/DEST\n"); @@ -274,7 +277,8 @@ void usage(enum logcode F) rprintf(F," or rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST]\n"); rprintf(F,"The ':' usages connect via remote shell, while '::' & 'rsync://' usages connect\n"); rprintf(F,"to an rsync daemon, and require SRC or DEST to start with a module name.\n"); - rprintf(F,"\nOptions\n"); + rprintf(F,"\n"); + rprintf(F,"Options\n"); rprintf(F," -v, --verbose increase verbosity\n"); rprintf(F," -q, --quiet suppress non-error messages\n"); rprintf(F," -c, --checksum skip based on checksum, not mod-time & size\n"); @@ -382,7 +386,8 @@ void usage(enum logcode F) rprintf(F," --version print version number\n"); rprintf(F,"(-h) --help show this help (-h works with no other options)\n"); - rprintf(F,"\nUse \"rsync --daemon --help\" to see the daemon-mode command-line options.\n"); + rprintf(F,"\n"); + rprintf(F,"Use \"rsync --daemon --help\" to see the daemon-mode command-line options.\n"); rprintf(F,"Please see the rsync(1) and rsyncd.conf(5) man pages for full documentation.\n"); rprintf(F,"See http://rsync.samba.org/ for updates, bug reports, and answers\n"); } @@ -547,7 +552,8 @@ static void daemon_usage(enum logcode F) { print_rsync_version(F); - rprintf(F,"\nUsage: rsync --daemon [OPTION]...\n"); + rprintf(F,"\n"); + rprintf(F,"Usage: rsync --daemon [OPTION]...\n"); rprintf(F," --address=ADDRESS bind to the specified address\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n"); rprintf(F," --config=FILE specify alternate rsyncd.conf file\n"); @@ -563,7 +569,8 @@ static void daemon_usage(enum logcode F) #endif rprintf(F," --help show this help screen\n"); - rprintf(F,"\nIf you were not trying to invoke rsync as a daemon, avoid using any of the\n"); + rprintf(F,"\n"); + rprintf(F,"If you were not trying to invoke rsync as a daemon, avoid using any of the\n"); rprintf(F,"daemon-specific rsync options. See also the rsyncd.conf(5) man page.\n"); } -- 2.34.1