summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-11-05 20:17:28 +0000
committerJim Meyering <jim@meyering.net>2002-11-05 20:17:28 +0000
commit3f2cc46da4afe2fac5aecd2009c8fa26e28d36e0 (patch)
treeb56345598a7742cbe63dfa2694ce5e3aa7da29b3
parent5526f4f208feaf1ca65bd83660780a9c04f408c3 (diff)
downloadcoreutils-3f2cc46da4afe2fac5aecd2009c8fa26e28d36e0.tar.xz
(print_factors):
Use primitives from inttostr.h, not human.h, to print large numbers simply.
-rw-r--r--src/factor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/factor.c b/src/factor.c
index c78cebbde..fc2a407a8 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -28,7 +28,7 @@
#include "system.h"
#include "closeout.h"
#include "error.h"
-#include "human.h"
+#include "inttostr.h"
#include "long-options.h"
#include "readtokens.h"
#include "xstrtol.h"
@@ -147,7 +147,7 @@ print_factors (const char *s)
uintmax_t n;
int n_factors;
int i;
- char buf[LONGEST_HUMAN_READABLE + 1];
+ char buf[INT_BUFSIZE_BOUND (uintmax_t)];
if (xstrtoumax (s, NULL, 10, &n, "") != LONGINT_OK)
{
@@ -155,9 +155,9 @@ print_factors (const char *s)
return 1;
}
n_factors = factor (n, MAX_N_FACTORS, factors);
- printf ("%s:", human_readable (n, buf, 1, 1));
+ printf ("%s:", umaxtostr (n, buf));
for (i = 0; i < n_factors; i++)
- printf (" %s", human_readable (factors[i], buf, 1, 1));
+ printf (" %s", umaxtostr (factors[i], buf));
putchar ('\n');
return 0;
}