[Expat-checkins] expat/gennmtab gennmtab.c,1.6,1.7

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Mon Jul 1 07:52:20 2002


Update of /cvsroot/expat/expat/gennmtab
In directory usw-pr-cvs1:/tmp/cvs-serv26976

Modified Files:
	gennmtab.c 
Log Message:
De-tabify; minor code-style consistency changes.

Index: gennmtab.c
===================================================================
RCS file: /cvsroot/expat/expat/gennmtab/gennmtab.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gennmtab.c	21 Sep 2000 21:20:17 -0000	1.6
+++ gennmtab.c	1 Jul 2002 14:51:16 -0000	1.7
@@ -1,6 +1,5 @@
-/*
-Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
-See the file COPYING for copying permission.
+/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
+   See the file COPYING for copying permission.
 */
 
 #include <string.h>
@@ -354,21 +353,23 @@
   { 0x30fc, 0x30fe },
 };
 
-void setTab(char *tab, struct range *ranges, size_t nRanges)
+static void
+setTab(char *tab, struct range *ranges, size_t nRanges)
 {
   size_t i;
   int j;
   for (i = 0; i < nRanges; i++) {
     if (ranges[i].end) {
       for (j = ranges[i].start; j <= ranges[i].end; j++)
-	tab[j] = 1;
+        tab[j] = 1;
     }
     else
       tab[ranges[i].start] = 1;
   }
 }
 
-void printTabs(char *tab)
+static void
+printTabs(char *tab)
 { 
   int nBitmaps = 2;
   int i, j, k;
@@ -384,21 +385,21 @@
     int kind = tab[i*256];
     for (j = 1; j < 256; j++)
       if (tab[i*256 +j] != kind) {
-	kind = -1;
-	break;
+        kind = -1;
+        break;
       }
     if (i >= 256 &&  memcmp(tab + (i - 256)*256, tab + i*256, 256) == 0)
       pageIndex[i] = pageIndex[i - 256];
     else if (kind == -1) { 
       pageIndex[i] = nBitmaps++;
       for (j = 0; j < 8; j++) {
-	unsigned val = 0;
-	for (k = 0; k < 32; k++) {
-	  if (tab[i*256 + j*32 +k])
-	    val |= (1 << k);
-	}
-	printf("0x%08X,", val);
-	putchar((((j + 1) & 3) == 0) ? '\n' : ' ');
+        unsigned val = 0;
+        for (k = 0; k < 32; k++) {
+          if (tab[i*256 + j*32 +k])
+            val |= (1 << k);
+        }
+        printf("0x%08X,", val);
+        putchar((((j + 1) & 3) == 0) ? '\n' : ' ');
       }
     }
     else
@@ -415,7 +416,8 @@
   printf("};\n");
 }
 
-int main()
+int
+main()
 { 
   char tab[2*65536];
   memset(tab, 0, 65536);