This commit was generated by cvs2svn to compensate for changes in r1365,
[chise/xemacs-chise.git.1] / lib-src / sorted-doc.c
index 89ecafd..0b77c45 100644 (file)
@@ -7,23 +7,15 @@
 
 /* Synched up with: FSF 19.28. */
 
-#include <../src/config.h>
+#include <config.h>
 
 #include <stdio.h>
 #include <ctype.h>
-#if __STDC__ || defined(STDC_HEADERS)
-# include <stdlib.h> /* for qsort() and malloc() */
-# include <string.h>
-static void *xmalloc (int);
-# ifndef CONST
-#  define CONST const
-# endif
-#else
-extern char *malloc ();
-static void *xmalloc ();
-# ifndef CONST
-#  define CONST
-# endif
+#include <stdlib.h> /* for qsort() and malloc() */
+#include <string.h>
+static void *xmalloc (size_t);
+#ifndef CONST
+# define CONST const
 #endif
 
 #define NUL    '\0'
@@ -31,9 +23,9 @@ static void *xmalloc ();
 
 #define DEBUG 0
 
-typedef struct line LINE;
+typedef struct LINE LINE;
 
-struct line
+struct LINE
 {
   LINE *next;                  /* ptr to next or NULL */
   char *line;                  /* text of the line */
@@ -72,9 +64,9 @@ fatal (char *s1, char *s2)
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 static void *
-xmalloc (int size)
+xmalloc (size_t size)
 {
-  char *result = malloc ((unsigned)size);
+  void *result = malloc (size);
   if (result == NULL)
     fatal ("%s", "virtual memory exhausted");
   return result;
@@ -83,9 +75,9 @@ xmalloc (int size)
 static char *
 strsav (char *str)
 {
-  char *buf = xmalloc (strlen (str) + 1);
-  (void) strcpy (buf, str);
-  return (buf);
+  char *buf = (char *) xmalloc (strlen (str) + 1);
+  strcpy (buf, str);
+  return buf;
 }
 
 /* Comparison function for qsort to call.  */
@@ -224,7 +216,8 @@ main (int argc, char *argv[])
     printf ("@unnumbered Command Summary for GNU Emacs\n");
     printf ("@table @asis\n");
     printf ("\n");
-    printf ("@let@ITEM@item\n");
+    printf ("@iftex\n");
+    printf ("@global@let@ITEM=@item\n");
     printf ("@def@item{@filbreak@vskip5pt@ITEM}\n");
     printf ("@font@tensy cmsy10 scaled @magstephalf\n");
     printf ("@font@teni cmmi10 scaled @magstephalf\n");
@@ -237,6 +230,7 @@ main (int argc, char *argv[])
     printf ("@chardef@@64\n");
     printf ("@catcode43=12\n");
     printf ("@tableindent-0.2in\n");
+    printf ("@end iftex\n");
 
     /* print each function from the array */
 
@@ -260,6 +254,7 @@ main (int argc, char *argv[])
            putchar ('\n');
          }
        printf("@end display\n");
+       if ( i%200 == 0 && i != 0 ) printf("@end table\n\n@table @asis\n");
       }
 
     printf ("@end table\n");