X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/18756bee6a2b8aa06f001bce6843bce5b2dfb0b0..95491579329778a89f78674fe3fe0bfee0a5b4fa:/unihash-mkstatic.c diff --git a/unihash-mkstatic.c b/unihash-mkstatic.c index ba074e6..f168227 100644 --- a/unihash-mkstatic.c +++ b/unihash-mkstatic.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: unihash-mkstatic.c,v 1.1 2003/12/15 20:52:56 mdw Exp $ + * $Id: unihash-mkstatic.c,v 1.2 2004/04/08 01:36:13 mdw Exp $ * * Build static universal hash tables * * (c) 2003 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the mLib utilities library. * @@ -15,28 +15,22 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * mLib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with mLib; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: unihash-mkstatic.c,v $ - * Revision 1.1 2003/12/15 20:52:56 mdw - * New program to make fixed tables for universal hashing. - * - */ - /*----- Header files ------------------------------------------------------*/ +#include "config.h" + #include #include #include @@ -176,7 +170,7 @@ int main(int argc, char *argv[]) unihash_setkey(&u, key); if (!sym) sym = (flags & f_ctab) ? "uhi" : "UHI_INIT"; - + /* --- Start output --- */ if (!file) @@ -239,12 +233,12 @@ int main(int argc, char *argv[]) if (k < N(u.s[i][j]) - 1) { fputc(',', fp); if (k % 4 == 3) - fputs(flags & f_ctab ? "\n " : "\t\t\t\\\n ", fp); + fputs(flags & f_ctab ? "\n " : "\t\t\t\\\n ", fp); } } if (j < N(u.s[i]) - 1) { - fputs(flags & f_ctab ? " },\n\n " : - " },\t\t\t\\\n\t\t\t\t\t\t\t\t\t\\\n ", fp); + fputs(flags & f_ctab ? " },\n\n " : + " },\t\t\t\\\n\t\t\t\t\t\t\t\t\t\\\n ", fp); } } if (i < N(u.s) - 1) {