chiark / gitweb /
buf.c: Step over terminating null byte.
[mLib] / unihash-mkstatic.c
index ba074e6783e6eaa090e8b3439723245fa2bcb54a..f1682279d891bd8bd0a3eab8870c76d3f6fd6eeb 100644 (file)
@@ -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.
  *
  * 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 <ctype.h>
 #include <errno.h>
 #include <stdio.h>
@@ -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) {