X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/eb31b00e4098ffb93eaf574f70cdd108b6610080..4e66da02f19648ee1be862e67ba1d1fc5549fb7f:/genprimes.c diff --git a/genprimes.c b/genprimes.c index 56e388e..2ee4115 100644 --- a/genprimes.c +++ b/genprimes.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: genprimes.c,v 1.5 2004/04/01 12:50:09 mdw Exp $ + * $Id: genprimes.c,v 1.6 2004/04/02 01:03:49 mdw Exp $ * * Generate prime number table * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: genprimes.c,v $ + * Revision 1.6 2004/04/02 01:03:49 mdw + * Miscellaneous constification. + * * 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. @@ -167,7 +170,7 @@ int main(int argc, char *argv[]) #define MAXPRIME %uu\n\ \n\ typedef %s smallprime;\n\ -extern smallprime %s[];\n\ +extern const smallprime %s[];\n\ \n\ #endif\n\ ", @@ -195,7 +198,7 @@ extern smallprime %s[];\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)