/* -*-c-*-
*
- * $Id: genprimes.c,v 1.5 2004/04/01 12:50:09 mdw Exp $
+ * $Id: genprimes.c,v 1.7 2004/04/08 01:36:15 mdw Exp $
*
* Generate prime number table
*
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: genprimes.c,v $
- * Revision 1.5 2004/04/01 12:50:09 mdw
- * Add cyclic group abstraction, with test code. Separate off exponentation
- * functions for better static linking. Fix a buttload of bugs on the way.
- * Generally ensure that negative exponents do inversion correctly. Add
- * table of standard prime-field subgroups. (Binary field subgroups are
- * currently unimplemented but easy to add if anyone ever finds a good one.)
- *
- * Revision 1.4 2001/03/04 13:08:10 mdw
- * Use @DA_LAST@ to determine @MAXPRIME@, now that it exists.
- *
- * Revision 1.3 2000/08/15 21:41:58 mdw
- * Create a new type for the small primes table elements.
- *
- * Revision 1.2 1999/12/22 15:48:39 mdw
- * Rename output file. Make output constants unsigned.
- *
- * Revision 1.1 1999/11/19 13:19:37 mdw
- * Generate small primes table.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include <ctype.h>
#define MAXPRIME %uu\n\
\n\
typedef %s smallprime;\n\
-extern smallprime %s[];\n\
+extern const smallprime %s[];\n\
\n\
#endif\n\
",
\n\
#include \"%s\"\n\
\n\
-%s %s[] = {",
+const %s %s[] = {",
header, type, name);
for (i = 0; i < DA_LEN(&p); i++) {
if (i % 8 == 0)