aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/sorted-doc.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-02 17:50:23 -0700
committerDan Nicolaescu2010-07-02 17:50:23 -0700
commit873fbd0b84997863af25e3ddae23b6c078a3e6f5 (patch)
treec128a27ee29666a3d1acb584bc5eab96a047e067 /lib-src/sorted-doc.c
parenta6ed0e289873ac982d7a9b0215d17a4626375b43 (diff)
downloademacs-873fbd0b84997863af25e3ddae23b6c078a3e6f5.tar.gz
emacs-873fbd0b84997863af25e3ddae23b6c078a3e6f5.zip
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.
Diffstat (limited to 'lib-src/sorted-doc.c')
-rw-r--r--lib-src/sorted-doc.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c
index ce58529193a..828e8db9a0b 100644
--- a/lib-src/sorted-doc.c
+++ b/lib-src/sorted-doc.c
@@ -65,8 +65,7 @@ struct docstr /* Allocated thing for an entry. */
65/* Print error message. `s1' is printf control string, `s2' is arg for it. */ 65/* Print error message. `s1' is printf control string, `s2' is arg for it. */
66 66
67void 67void
68error (s1, s2) 68error (char *s1, char *s2)
69 char *s1, *s2;
70{ 69{
71 fprintf (stderr, "sorted-doc: "); 70 fprintf (stderr, "sorted-doc: ");
72 fprintf (stderr, s1, s2); 71 fprintf (stderr, s1, s2);
@@ -76,8 +75,7 @@ error (s1, s2)
76/* Print error message and exit. */ 75/* Print error message and exit. */
77 76
78void 77void
79fatal (s1, s2) 78fatal (char *s1, char *s2)
80 char *s1, *s2;
81{ 79{
82 error (s1, s2); 80 error (s1, s2);
83 exit (EXIT_FAILURE); 81 exit (EXIT_FAILURE);
@@ -86,8 +84,7 @@ fatal (s1, s2)
86/* Like malloc but get fatal error if memory is exhausted. */ 84/* Like malloc but get fatal error if memory is exhausted. */
87 85
88char * 86char *
89xmalloc (size) 87xmalloc (int size)
90 int size;
91{ 88{
92 char *result = malloc ((unsigned)size); 89 char *result = malloc ((unsigned)size);
93 if (result == NULL) 90 if (result == NULL)
@@ -96,8 +93,7 @@ xmalloc (size)
96} 93}
97 94
98char * 95char *
99xstrdup (str) 96xstrdup (char *str)
100 char * str;
101{ 97{
102 char *buf = xmalloc (strlen (str) + 1); 98 char *buf = xmalloc (strlen (str) + 1);
103 (void) strcpy (buf, str); 99 (void) strcpy (buf, str);
@@ -107,9 +103,7 @@ xstrdup (str)
107/* Comparison function for qsort to call. */ 103/* Comparison function for qsort to call. */
108 104
109int 105int
110cmpdoc (a, b) 106cmpdoc (DOCSTR **a, DOCSTR **b)
111 DOCSTR **a;
112 DOCSTR **b;
113{ 107{
114 register int val = strcmp ((*a)->name, (*b)->name); 108 register int val = strcmp ((*a)->name, (*b)->name);
115 if (val) return val; 109 if (val) return val;
@@ -128,7 +122,7 @@ char *states[] =
128}; 122};
129 123
130int 124int
131main () 125main (void)
132{ 126{
133 register DOCSTR *dp = NULL; /* allocated DOCSTR */ 127 register DOCSTR *dp = NULL; /* allocated DOCSTR */
134 register LINE *lp = NULL; /* allocated line */ 128 register LINE *lp = NULL; /* allocated line */