diff lib-src/sorted-doc.c @ 109111:52b76722152a

Convert function definitions to standard C. * lib-src/update-game-score.c: Convert function definitions to standard C. * lib-src/sorted-doc.c: * lib-src/profile.c: * lib-src/pop.c: * lib-src/movemail.c: * lib-src/make-docfile.c: * lib-src/hexl.c: * lib-src/fakemail.c: * lib-src/etags.c: * lib-src/ebrowse.c: * lib-src/digest-doc.c: * lib-src/b2m.c: Likewise.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 02 Jul 2010 17:50:23 -0700
parents 1d1d5d9bd884
children 71150397fb59
line wrap: on
line diff
--- a/lib-src/sorted-doc.c	Sat Jul 03 01:35:09 2010 +0300
+++ b/lib-src/sorted-doc.c	Fri Jul 02 17:50:23 2010 -0700
@@ -65,8 +65,7 @@
 /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
 
 void
-error (s1, s2)
-     char *s1, *s2;
+error (char *s1, char *s2)
 {
   fprintf (stderr, "sorted-doc: ");
   fprintf (stderr, s1, s2);
@@ -76,8 +75,7 @@
 /* Print error message and exit.  */
 
 void
-fatal (s1, s2)
-     char *s1, *s2;
+fatal (char *s1, char *s2)
 {
   error (s1, s2);
   exit (EXIT_FAILURE);
@@ -86,8 +84,7 @@
 /* Like malloc but get fatal error if memory is exhausted.  */
 
 char *
-xmalloc (size)
-     int size;
+xmalloc (int size)
 {
   char *result = malloc ((unsigned)size);
   if (result == NULL)
@@ -96,8 +93,7 @@
 }
 
 char *
-xstrdup (str)
-     char * str;
+xstrdup (char *str)
 {
   char *buf = xmalloc (strlen (str) + 1);
   (void) strcpy (buf, str);
@@ -107,9 +103,7 @@
 /* Comparison function for qsort to call.  */
 
 int
-cmpdoc (a, b)
-     DOCSTR **a;
-     DOCSTR **b;
+cmpdoc (DOCSTR **a, DOCSTR **b)
 {
   register int val = strcmp ((*a)->name, (*b)->name);
   if (val) return val;
@@ -128,7 +122,7 @@
 };
 
 int
-main ()
+main (void)
 {
   register DOCSTR *dp = NULL;	/* allocated DOCSTR */
   register LINE *lp = NULL;	/* allocated line */