X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/7db733d4d0fd085313e4ae3d8ff9b7cc533616bb..cc3ca08f22460b15423bb88632f3a12741b19003:/blowfish-mktab.c 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 }