diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-09-30 18:22:54 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-09-30 18:22:54 +0400 |
commit | 08bc9e01c274a01d107b348f921e1c74dd04bd3a (patch) | |
tree | 25348bff03c29d9dd6c6dd96bf82c7c9f9265ccf /src/factor.c | |
parent | b9c7373f203ab77c58cb6b131f8b58236ea337a2 (diff) | |
parent | c18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff) | |
download | coreutils-08bc9e01c274a01d107b348f921e1c74dd04bd3a.tar.gz |
Merge tag 'upstream/8.23'
Upstream version 8.23
Diffstat (limited to 'src/factor.c')
-rw-r--r-- | src/factor.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/factor.c b/src/factor.c index 8f1542a2..63924d54 100644 --- a/src/factor.c +++ b/src/factor.c @@ -1,5 +1,5 @@ /* factor -- print prime factors of n. - Copyright (C) 1986-2013 Free Software Foundation, Inc. + Copyright (C) 1986-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -689,22 +689,6 @@ verify (W <= WIDE_UINT_BITS); This flag is used only in the GMP code. */ static bool dev_debug = false; -/* Like error(0, 0, ...), but without an implicit newline. - Also a noop unless the global DEV_DEBUG is set. - TODO: Replace with variadic macro in system.h or - move to a separate module. */ -static inline void -devmsg (char const *fmt, ...) -{ - if (dev_debug) - { - va_list ap; - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); - } -} - /* Prove primality or run probabilistic tests. */ static bool flag_prove_primality = true; @@ -791,7 +775,7 @@ factor_using_division (uintmax_t *t1p, uintmax_t t1, uintmax_t t0, { for (;;) { - uintmax_t q1, q0, hi, lo ATTRIBUTE_UNUSED; + uintmax_t q1, q0, hi, lo _GL_UNUSED; q0 = t0 * primes_dtab[i].binv; umul_ppmm (hi, lo, q0, p); @@ -933,7 +917,7 @@ static const unsigned char binvert_table[128] = _q0 = (u0) * _di; \ if ((u1) >= (d)) \ { \ - uintmax_t _p1, _p0 ATTRIBUTE_UNUSED; \ + uintmax_t _p1, _p0 _GL_UNUSED; \ umul_ppmm (_p1, _p0, _q0, d); \ (q1) = ((u1) - _p1) * _di; \ (q0) = _q0; \ @@ -948,7 +932,7 @@ static const unsigned char binvert_table[128] = /* x B (mod n). */ #define redcify(r_prim, r, n) \ do { \ - uintmax_t _redcify_q ATTRIBUTE_UNUSED; \ + uintmax_t _redcify_q _GL_UNUSED; \ udiv_qrnnd (_redcify_q, r_prim, r, 0, n); \ } while (0) @@ -981,7 +965,7 @@ static const unsigned char binvert_table[128] = static inline uintmax_t mulredc (uintmax_t a, uintmax_t b, uintmax_t m, uintmax_t mi) { - uintmax_t rh, rl, q, th, tl ATTRIBUTE_UNUSED, xh; + uintmax_t rh, rl, q, th, tl _GL_UNUSED, xh; umul_ppmm (rh, rl, a, b); q = rl * mi; @@ -1001,7 +985,7 @@ mulredc2 (uintmax_t *r1p, uintmax_t a1, uintmax_t a0, uintmax_t b1, uintmax_t b0, uintmax_t m1, uintmax_t m0, uintmax_t mi) { - uintmax_t r1, r0, q, p1, p0 ATTRIBUTE_UNUSED, t1, t0, s1, s0; + uintmax_t r1, r0, q, p1, p0 _GL_UNUSED, t1, t0, s1, s0; mi = -mi; assert ( (a1 >> (W_TYPE_SIZE - 1)) == 0); assert ( (b1 >> (W_TYPE_SIZE - 1)) == 0); @@ -1271,7 +1255,7 @@ prime_p (uintmax_t n) a_prim = s0 % n; else { - uintmax_t dummy ATTRIBUTE_UNUSED; + uintmax_t dummy _GL_UNUSED; udiv_qrnnd (dummy, a_prim, s1, s0, n); } } @@ -1803,7 +1787,7 @@ isqrt2 (uintmax_t nh, uintmax_t nl) /* Do we need more than one iteration? */ for (;;) { - uintmax_t r ATTRIBUTE_UNUSED; + uintmax_t r _GL_UNUSED; uintmax_t q, y; udiv_qrnnd (q, r, nh, nl, x); y = (x + q) / 2; |