diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/factor.c | 16 | ||||
-rw-r--r-- | src/numfmt.c | 16 | ||||
-rw-r--r-- | src/system.h | 10 |
4 files changed, 11 insertions, 32 deletions
@@ -68,6 +68,7 @@ GNU coreutils NEWS -*- outline -*- numfmt supports zero padding of numbers using the standard printf syntax of a leading zero, for example --format="%010f". + Also throughput was improved by up to 800% by avoiding redundant processing. shred now supports multiple passes on GNU/Linux tape devices by rewinding the tape before each pass, avoids redundant writes to empty files, diff --git a/src/factor.c b/src/factor.c index c55edb894..63924d545 100644 --- a/src/factor.c +++ b/src/factor.c @@ -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; diff --git a/src/numfmt.c b/src/numfmt.c index c7448752c..e8f53fc3f 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -198,22 +198,6 @@ static int decimal_point_length; /* debugging for developers. Enables devmsg(). */ 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); - } -} - static inline int default_scale_base (enum scale_type scale) { diff --git a/src/system.h b/src/system.h index a9588e779..f295ad1c2 100644 --- a/src/system.h +++ b/src/system.h @@ -617,6 +617,16 @@ usable_st_size (struct stat const *sb) void usage (int status) ATTRIBUTE_NORETURN; +/* Like error(0, 0, ...), but without an implicit newline. + Also a noop unless the global DEV_DEBUG is set. */ +#define devmsg(...) \ + do \ + { \ + if (dev_debug) \ + fprintf (stderr, __VA_ARGS__); \ + } \ + while (0) + #define emit_cycle_warning(file_name) \ do \ { \ |