diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-11 07:50:42 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-11 07:50:42 +0200 |
commit | a976aaab0be819d11575cbbde64406391ada873b (patch) | |
tree | d87016227ce6b9be67d89a8d5dd69faef26b7c65 /coreutils | |
parent | 8a134ec68075fc2fd415558bcf6a37cda3ff285f (diff) | |
download | busybox-w32-a976aaab0be819d11575cbbde64406391ada873b.tar.gz busybox-w32-a976aaab0be819d11575cbbde64406391ada873b.tar.bz2 busybox-w32-a976aaab0be819d11575cbbde64406391ada873b.zip |
factor: remove debug code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/factor.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/coreutils/factor.c b/coreutils/factor.c index 11cc04f92..66d6a7cae 100644 --- a/coreutils/factor.c +++ b/coreutils/factor.c | |||
@@ -27,8 +27,6 @@ | |||
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | typedef unsigned long long wide_t; | 29 | typedef unsigned long long wide_t; |
30 | #define WIDE_BITS (unsigned)(sizeof(wide_t)*8) | ||
31 | #define TOPMOST_WIDE_BIT ((wide_t)1 << (WIDE_BITS-1)) | ||
32 | 30 | ||
33 | #if ULLONG_MAX == (UINT_MAX * UINT_MAX + 2 * UINT_MAX) | 31 | #if ULLONG_MAX == (UINT_MAX * UINT_MAX + 2 * UINT_MAX) |
34 | /* "unsigned" is half as wide as ullong */ | 32 | /* "unsigned" is half as wide as ullong */ |
@@ -164,23 +162,6 @@ static NOINLINE void factorize(wide_t N) | |||
164 | int factor_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 162 | int factor_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
165 | int factor_main(int argc UNUSED_PARAM, char **argv) | 163 | int factor_main(int argc UNUSED_PARAM, char **argv) |
166 | { | 164 | { |
167 | #if 0 /* test isqrt() correctness */ | ||
168 | wide_t n = argv[1] ? bb_strtoull(argv[1], NULL, 0) : time(NULL); | ||
169 | for (;;) { | ||
170 | half_t h; | ||
171 | if (--n == 0) | ||
172 | --n; | ||
173 | h = isqrt(n); | ||
174 | if (!(n & 0xff)) | ||
175 | printf("isqrt(%llx)=%"HALF_FMT"x\n", n, h); | ||
176 | if ((wide_t)h * h > n) | ||
177 | return 1; | ||
178 | h++; | ||
179 | if (h != 0 && (wide_t)h * h <= n) | ||
180 | return 1; | ||
181 | } | ||
182 | #endif | ||
183 | |||
184 | //// coreutils has undocumented option ---debug (three dashes) | 165 | //// coreutils has undocumented option ---debug (three dashes) |
185 | //getopt32(argv, ""); | 166 | //getopt32(argv, ""); |
186 | //argv += optind; | 167 | //argv += optind; |