From: Mark Wooding Date: Sat, 1 Jun 2013 19:35:54 +0000 (+0100) Subject: blowfish-mktab.c: Remove the eye-candy progress meter. X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/cc3ca08f22460b15423bb88632f3a12741b19003?hp=7db733d4d0fd085313e4ae3d8ff9b7cc533616bb blowfish-mktab.c: Remove the eye-candy progress meter. It really makes a mess of parallel builds. --- diff --git a/Makefile.am b/Makefile.am index 98c246a..36580fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -512,6 +512,7 @@ BLKCS += blowfish blowfish.lo: blowfish-tab.h CLEANFILES += blowfish-tab.h noinst_PROGRAMS += blowfish-mktab +blowfish_mktab_CPPFLAGS = $(AM_CPPFLAGS) -DQUIET blowfish-tab.h: blowfish-mktab$e $(AM_V_GEN)./blowfish-mktab >blowfish-tab.h.new && \ mv blowfish-tab.h.new blowfish-tab.h diff --git a/blowfish-mktab.c b/blowfish-mktab.c index 86c079e..9d6fcb2 100644 --- a/blowfish-mktab.c +++ b/blowfish-mktab.c @@ -58,6 +58,12 @@ #define SPIGOT_RADIX (1ul << SPIGOT_BITS) #define SPIGOT_BUFLEN (SPIGOT_WORDS * 32) +#ifdef QUIET +# define Q(x) +#else +# define Q(x) x +#endif + static void spigot(uint32 *buf, size_t n) { uint32 acc = 0; @@ -66,10 +72,10 @@ static void spigot(uint32 *buf, size_t n) uint32 p = 0; unsigned f = 0; unsigned max = 32 * n; - size_t step = n / 60; + Q( size_t step = n / 60; ) - fputs("[ ]\r[", - stderr); + Q( fputs("[ ]\r[", + stderr); ) #define EMIT(z) do { \ if (b == -1) \ @@ -84,8 +90,8 @@ static void spigot(uint32 *buf, size_t n) n--; \ if (!n) \ goto done; \ - if (n % step == 0) \ - fputc('.', stderr); \ + Q( if (n % step == 0) \ + fputc('.', stderr); ) \ } \ } \ } while (0) @@ -119,8 +125,8 @@ static void spigot(uint32 *buf, size_t n) } } -done: - fputc('\n', stderr); +done:; + Q( fputc('\n', stderr); ) #undef EMIT }