summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-11-05 20:16:31 +0000
committerJim Meyering <jim@meyering.net>2002-11-05 20:16:31 +0000
commit5526f4f208feaf1ca65bd83660780a9c04f408c3 (patch)
tree6932e456a82cb0fc1051b744e9b08d967a67e6c1 /src
parent1e583af98a5279cf4861c421f1240ffa93886a0d (diff)
downloadcoreutils-5526f4f208feaf1ca65bd83660780a9c04f408c3.tar.xz
(print_stats, main):
Use primitives from inttostr.h, not human.h, to print large numbers simply.
Diffstat (limited to 'src')
-rw-r--r--src/dd.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/dd.c b/src/dd.c
index aa0b3beed..1a9d8a1e5 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -31,7 +31,7 @@
#include "error.h"
#include "full-write.h"
#include "getpagesize.h"
-#include "human.h"
+#include "inttostr.h"
#include "long-options.h"
#include "quote.h"
#include "safe-read.h"
@@ -358,17 +358,15 @@ bit_count (register int i)
static void
print_stats (void)
{
- char buf[2][LONGEST_HUMAN_READABLE + 1];
+ char buf[2][INT_BUFSIZE_BOUND (uintmax_t)];
fprintf (stderr, _("%s+%s records in\n"),
- human_readable (r_full, buf[0], 1, 1),
- human_readable (r_partial, buf[1], 1, 1));
+ umaxtostr (r_full, buf[0]), umaxtostr (r_partial, buf[1]));
fprintf (stderr, _("%s+%s records out\n"),
- human_readable (w_full, buf[0], 1, 1),
- human_readable (w_partial, buf[1], 1, 1));
+ umaxtostr (w_full, buf[0]), umaxtostr (w_partial, buf[1]));
if (r_truncate > 0)
{
fprintf (stderr, "%s %s\n",
- human_readable (r_truncate, buf[0], 1, 1),
+ umaxtostr (r_truncate, buf[0]),
(r_truncate == 1
? _("truncated record")
: _("truncated records")));
@@ -1211,11 +1209,10 @@ main (int argc, char **argv)
|| S_ISDIR (stdout_stat.st_mode)
|| S_TYPEISSHM (&stdout_stat)))
{
- char buf[LONGEST_HUMAN_READABLE + 1];
+ char buf[INT_BUFSIZE_BOUND (off_t)];
error (EXIT_FAILURE, errno,
_("advancing past %s bytes in output file %s"),
- human_readable (o, buf, 1, 1),
- quote (output_file));
+ offtostr (o, buf), quote (output_file));
}
}
#endif