X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/b7580524f33ee21d3ddc49fe36a71e107e87df1b..8c685f4299a114153b85a424c1b3841513ff506d:/crc-mktab.c diff --git a/crc-mktab.c b/crc-mktab.c index 887315b..def5361 100644 --- a/crc-mktab.c +++ b/crc-mktab.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: crc-mktab.c,v 1.1 2000/07/21 19:01:33 mdw Exp $ + * $Id: crc-mktab.c,v 1.2 2000/10/08 11:07:21 mdw Exp $ * * Build CRC tables * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: crc-mktab.c,v $ + * Revision 1.2 2000/10/08 11:07:21 mdw + * With no arguments, give an error rather than spewing a big table at the + * user. + * * Revision 1.1 2000/07/21 19:01:33 mdw * Generate the CRC table rather than hardcoding it. * @@ -231,11 +235,13 @@ int main(int argc, char *argv[]) poly = 0x1021; break; case 32: - case 0: poly = 0x04c11db7; flags |= f_reverse; bits = 32; break; + case 0: + die(EXIT_FAILURE, "no polynomial or bit width set"); + break; default: die(EXIT_FAILURE, "no standard polynomials for %u bits", bits); break;