Use big_num() in a few more places.

This commit is contained in:
Wayne Davison committed 2008-07-17 17:01:10 -07:00
1 parent 3a8fad7805
commit 7f0db4fd8e
3 files changed
+13 -13

No files matched your search

+5 -5
View File
@@ -1198,7 +1198,7 @@ static int try_dests_non(struct file_struct *file, char *fname, int ndx,
static void list_file_entry(struct file_struct *f)
{
char permbuf[PERMSTRING_SIZE];
double len;
int64 len;
if (!F_IS_ACTIVE(f)) {
/* this can happen if duplicate names were removed */
@@ -1212,14 +1212,14 @@ static void list_file_entry(struct file_struct *f)
#ifdef SUPPORT_LINKS
if (preserve_links && S_ISLNK(f->mode)) {
rprintf(FINFO, "%s %11.0f %s %s -> %s\n",
permbuf, len, timestring(f->modtime),
rprintf(FINFO, "%s %11s %s %s -> %s\n",
permbuf, big_num(len, 0), timestring(f->modtime),
f_name(f, NULL), F_SYMLINK(f));
} else
#endif
{
rprintf(FINFO, "%s %11.0f %s %s\n",
permbuf, len, timestring(f->modtime),
rprintf(FINFO, "%s %11s %s %s\n",
permbuf, big_num(len, 0), timestring(f->modtime),
f_name(f, NULL));
}
}
+6 -6
View File
@@ -499,9 +499,9 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
n = client_addr(0);
break;
case 'l':
strlcat(fmt, ".0f", sizeof fmt);
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2, sizeof buf2, fmt,
(double)F_LENGTH(file));
big_num(F_LENGTH(file), 0));
n = buf2;
break;
case 'U':
@@ -617,8 +617,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
b = stats.total_read -
initial_stats->total_read;
}
strlcat(fmt, ".0f", sizeof fmt);
snprintf(buf2, sizeof buf2, fmt, (double)b);
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2, sizeof buf2, fmt, big_num(b, 0));
n = buf2;
break;
case 'c':
@@ -629,8 +629,8 @@ static void log_formatted(enum logcode code, const char *format, const char *op,
b = stats.total_read -
initial_stats->total_read;
}
strlcat(fmt, ".0f", sizeof fmt);
snprintf(buf2, sizeof buf2, fmt, (double)b);
strlcat(fmt, "s", sizeof fmt);
snprintf(buf2, sizeof buf2, fmt, big_num(b, 0));
n = buf2;
break;
case 'i':
+2 -2
View File
@@ -179,8 +179,8 @@ static void list_file(const char *fname)
printf("%5ld,%6ld",
(long)major(buf.st_rdev),
(long)minor(buf.st_rdev));
} else /* NB: use double for size since it might not fit in a long. */
printf("%12.0f", (double)buf.st_size);
} else
printf("%12s", big_num(buf.st_size, 0));
printf(" %6ld.%-6ld %6ld %s %s%s\n",
(long)buf.st_uid, (long)buf.st_gid, (long)buf.st_nlink,
datebuf, fname, linkbuf);