Reorder the static functions to avoid the need for forward declarations.
[rsync/rsync.git] / options.c
index 739ae91..dce215e 100644 (file)
--- a/options.c
+++ b/options.c
@@ -78,15 +78,14 @@ int def_compress_level = Z_DEFAULT_COMPRESSION;
 int am_root = 0; /* 0 = normal, 1 = root, 2 = --super, -1 = --fake-super */
 int am_server = 0;
 int am_sender = 0;
-int am_generator = 0;
 int am_starting_up = 1;
 int relative_paths = -1;
 int implied_dirs = 1;
 int numeric_ids = 0;
+int msgs2stderr = 0;
 int allow_8bit_chars = 0;
 int force_delete = 0;
 int io_timeout = 0;
-int allowed_lull = 0;
 int prune_empty_dirs = 0;
 int use_qsort = 0;
 char *files_from = NULL;
@@ -199,10 +198,10 @@ struct chmod_mode_struct *chmod_modes = NULL;
 static const char *debug_verbosity[] = {
        /*0*/ NULL,
        /*1*/ NULL,
-       /*2*/ "bind,cmd,chksum,connect,del,dup,filter,flist",
-       /*3*/ "acl,backup,chksum2,del2,exit,filter2,flist2,fuzzy,genr,own,recv,send,time",
-       /*4*/ "cmd2,chksum3,del3,exit2,flist3,iconv,own2,proto,time2",
-       /*5*/ "chdir,chksum4,flist4,fuzzy2,hlink",
+       /*2*/ "bind,cmd,deltasum,connect,del,dup,filter,flist",
+       /*3*/ "acl,backup,deltasum2,del2,exit,filter2,flist2,fuzzy,genr,own,recv,send,time",
+       /*4*/ "cmd2,deltasum3,del3,exit2,flist3,iconv,own2,proto,time2",
+       /*5*/ "chdir,deltasum4,flist4,fuzzy2,hlink",
 };
 
 #define MAX_VERBOSITY ((int)(sizeof debug_verbosity / sizeof debug_verbosity[0]) - 1)
@@ -262,9 +261,9 @@ static struct output_struct debug_words[COUNT_DEBUG+1] = {
        DEBUG_WORD(BIND, W_CLI, "Debug socket bind actions"),
        DEBUG_WORD(CHDIR, W_CLI|W_SRV, "Debug when the current directory changes"),
        DEBUG_WORD(CONNECT, W_CLI, "Debug connection events"),
-       DEBUG_WORD(CHKSUM, W_SND|W_REC, "Debug delta-transfer checksumming (levels 1-4)"),
        DEBUG_WORD(CMD, W_CLI, "Debug commands+options that are issued (levels 1-2)"),
        DEBUG_WORD(DEL, W_REC, "Debug delete actions (levels 1-3)"),
+       DEBUG_WORD(DELTASUM, W_SND|W_REC, "Debug delta-transfer checksumming (levels 1-4)"),
        DEBUG_WORD(DUP, W_REC, "Debug weeding of duplicate names"),
        DEBUG_WORD(EXIT, W_CLI|W_SRV, "Debug exit events (levels 1-2)"),
        DEBUG_WORD(FILTER, W_SND|W_REC, "Debug filter actions (levels 1-2)"),
@@ -795,6 +794,7 @@ static struct poptOption long_options[] = {
   {"no-v",             0,  POPT_ARG_VAL,    &verbose, 0, 0, 0 },
   {"info",             0,  POPT_ARG_STRING, 0, OPT_INFO, 0, 0 },
   {"debug",            0,  POPT_ARG_STRING, 0, OPT_DEBUG, 0, 0 },
+  {"msgs2stderr",      0,  POPT_ARG_NONE,   &msgs2stderr, 0, 0, 0 },
   {"quiet",           'q', POPT_ARG_NONE,   0, 'q', 0, 0 },
   {"motd",             0,  POPT_ARG_VAL,    &output_motd, 1, 0, 0 },
   {"no-motd",          0,  POPT_ARG_VAL,    &output_motd, 0, 0, 0 },
@@ -1901,7 +1901,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                else if (log_format_has(stdout_format, 'i'))
                        stdout_format_has_i = itemize_changes | 1;
                if (!log_format_has(stdout_format, 'b')
-                && !log_format_has(stdout_format, 'c'))
+                && !log_format_has(stdout_format, 'c')
+                && !log_format_has(stdout_format, 'C'))
                        log_before_transfer = !am_server;
        } else if (itemize_changes) {
                stdout_format = "%i %n%L";