Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove bogus "non-empty" qualifier in '*' discussion.
[rsync/rsync.git]
/
options.c
diff --git
a/options.c
b/options.c
index
f47c633
..
2d04974
100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-20,7
+20,7
@@
*/
#include "rsync.h"
*/
#include "rsync.h"
-#include "i
func
s.h"
+#include "i
type
s.h"
#include <popt.h>
#include "zlib/zlib.h"
#include <popt.h>
#include "zlib/zlib.h"
@@
-93,7
+93,7
@@
int filesfrom_fd = -1;
char *filesfrom_host = NULL;
int eol_nulls = 0;
int protect_args = 0;
char *filesfrom_host = NULL;
int eol_nulls = 0;
int protect_args = 0;
-int human_readable =
0
;
+int human_readable =
1
;
int recurse = 0;
int allow_inc_recurse = 1;
int xfer_dirs = -1;
int recurse = 0;
int allow_inc_recurse = 1;
int xfer_dirs = -1;
@@
-121,6
+121,7
@@
int checksum_seed = 0;
int inplace = 0;
int delay_updates = 0;
long block_size = 0; /* "long" because popt can't set an int32. */
int inplace = 0;
int delay_updates = 0;
long block_size = 0; /* "long" because popt can't set an int32. */
+char number_separator;
char *skip_compress = NULL;
item_list dparam_list = EMPTY_ITEM_LIST;
char *skip_compress = NULL;
item_list dparam_list = EMPTY_ITEM_LIST;
@@
-1669,7
+1670,7
@@
int parse_arguments(int *argc_p, const char ***argv_p)
}
}
}
}
- if (human_readable && argc == 2 && !am_server) {
+ if (human_readable
> 1
&& argc == 2 && !am_server) {
/* Allow the old meaning of 'h' (--help) on its own. */
usage(FINFO);
exit_cleanup(0);
/* Allow the old meaning of 'h' (--help) on its own. */
usage(FINFO);
exit_cleanup(0);
@@
-1682,6
+1683,15
@@
int parse_arguments(int *argc_p, const char ***argv_p)
verbose > 1 ? "stats3" : "stats2", DEFAULT_PRIORITY);
}
verbose > 1 ? "stats3" : "stats2", DEFAULT_PRIORITY);
}
+ if (human_readable) {
+ char buf[32];
+ snprintf(buf, sizeof buf, "%f", 3.14);
+ if (strchr(buf, '.') != NULL)
+ number_separator = ',';
+ else
+ number_separator = '.';
+ }
+
#ifdef ICONV_OPTION
if (iconv_opt && protect_args != 2) {
if (!am_server && strcmp(iconv_opt, "-") == 0)
#ifdef ICONV_OPTION
if (iconv_opt && protect_args != 2) {
if (!am_server && strcmp(iconv_opt, "-") == 0)
@@
-2244,6
+2254,9
@@
void server_options(char **args, int *argc_p)
argstr[x++] = 'i';
#if defined HAVE_LUTIMES && defined HAVE_UTIMES
argstr[x++] = 'L';
argstr[x++] = 'i';
#if defined HAVE_LUTIMES && defined HAVE_UTIMES
argstr[x++] = 'L';
+#endif
+#ifdef ICONV_OPTION
+ argstr[x++] = 's';
#endif
}
#endif
}