nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/unproto/error.c b/unproto/error.c
2index 667d978cbb..2fbccacb4d 100644
3--- a/unproto/error.c
4+++ b/unproto/error.c
5@@ -53,7 +53,7 @@
6
7 #include <stdio.h>
8
9-extern void exit();
10+extern void exit(int status);
11
12 /* Application-specific stuff */
13
14diff --git a/unproto/error.h b/unproto/error.h
15index dfb27e9067..cb52ae646b 100644
16--- a/unproto/error.h
17+++ b/unproto/error.h
18@@ -1,6 +1,6 @@
19 /* @(#) error.h 1.2 92/01/15 21:53:14 */
20
21 extern int errcount; /* error counter */
22-extern void error(); /* default context */
23-extern void error_where(); /* user-specified context */
24-extern void fatal(); /* fatal error */
25+extern void error(char *text); /* default context */
26+extern void error_where(char *path, int line, char *text); /* user-specified context */
27+extern void fatal(char *text); /* fatal error */
28diff --git a/unproto/strsave.c b/unproto/strsave.c
29index 2ee00b4172..faa4e18686 100644
30--- a/unproto/strsave.c
31+++ b/unproto/strsave.c
32@@ -28,7 +28,7 @@
33 #include <string.h>
34
35 extern int hash(register char *s, unsigned size);
36-extern char *malloc();
37+extern char *malloc(long size);
38
39 /* Application-specific stuff */
40
41diff --git a/unproto/symbol.c b/unproto/symbol.c
42index 67a4bf0bc6..a4beab5e92 100644
43--- a/unproto/symbol.c
44+++ b/unproto/symbol.c
45@@ -45,7 +45,7 @@
46 #include <string.h>
47
48 extern int hash(register char *s, unsigned size);
49-extern char *malloc();
50+extern char *malloc(long size);
51
52 /* Application-specific stuff */
53
54diff --git a/unproto/symbol.h b/unproto/symbol.h
55index 0711c1f4dc..0e2b1d88f8 100644
56--- a/unproto/symbol.h
57+++ b/unproto/symbol.h
58@@ -6,6 +6,6 @@
59 struct symbol *next;
60 };
61
62-extern void sym_enter(); /* add symbol to table */
63-extern struct symbol *sym_find(); /* locate symbol */
64+extern void sym_enter(char *name, int type); /* add symbol to table */
65+extern struct symbol *sym_find(register char *name); /* locate symbol */
66 extern void sym_init(); /* prime the table */
67diff --git a/unproto/tok_class.c b/unproto/tok_class.c
68index 04207a07f3..9af67188ca 100644
69--- a/unproto/tok_class.c
70+++ b/unproto/tok_class.c
71@@ -51,8 +51,8 @@
72 #include <stdio.h>
73 #include <string.h>
74
75-extern long time();
76-extern char* ctime();
77+extern long time(long *tloc);
78+extern char* ctime(long *clock);
79
80 /* Application-specific stuff */
81
82@@ -61,13 +61,13 @@
83 #include "token.h"
84 #include "symbol.h"
85
86-static struct token *tok_list();
87-static void tok_list_struct();
88-static void tok_list_append();
89-static void tok_strcat();
90-static void tok_time();
91-static void tok_date();
92-static void tok_space_append();
93+static struct token *tok_list(struct token *t);
94+static void tok_list_struct(register struct token *list, register struct token *t);
95+static void tok_list_append(struct token *h, struct token *t);
96+static void tok_strcat(register struct token *t1);
97+static void tok_time(struct token *t);
98+static void tok_date(struct token *t);
99+static void tok_space_append(register struct token *list, register struct token *t);
100
101 #if defined(MAP_VOID_STAR) || defined(MAP_VOID)
102 static void tok_void(); /* rewrite void keyword */
103diff --git a/unproto/tok_io.c b/unproto/tok_io.c
104index 288950b3ac..773ca5bf4d 100644
105--- a/unproto/tok_io.c
106+++ b/unproto/tok_io.c
107@@ -89,7 +89,7 @@
108 #include "vstring.h"
109 #include "error.h"
110
111-extern char *strsave(); /* XXX need include file */
112+extern char *strsave(register char *str); /* XXX need include file */
113
114 /* Stuff to keep track of original source file name and position */
115
116@@ -104,12 +104,12 @@
117
118 /* Forward declarations */
119
120-static int read_quoted();
121-static void read_comment();
122+static int read_quoted(register struct vstring *vs, int ch);
123+static void read_comment(register struct vstring *vs);
124 static int backslash_newline();
125-static char *read_hex();
126-static char *read_octal();
127-static void fix_line_control();
128+static char *read_hex(struct vstring *vs, register char *cp);
129+static char *read_octal(register struct vstring *vs, register char *cp, register int c);
130+static void fix_line_control(register char *path, register int line);
131
132 /*
133 * Character input with one level of pushback. The INPUT() macro recursively
134diff --git a/unproto/tok_pool.c b/unproto/tok_pool.c
135index e2ed107ce7..bbe3d184c5 100644
136--- a/unproto/tok_pool.c
137+++ b/unproto/tok_pool.c
138@@ -37,7 +37,7 @@
139
140 /* C library */
141
142-extern char *malloc();
143+extern char *malloc(long size);
144
145 /* Application-specific stuff */
146
147diff --git a/unproto/token.h b/unproto/token.h
148index bb2f50a106..e3752a0eb3 100644
149--- a/unproto/token.h
150+++ b/unproto/token.h
151@@ -27,11 +27,11 @@
152 /* Input/output functions and macros */
153
154 extern struct token *tok_get(); /* read next single token */
155-extern void tok_show(); /* display (composite) token */
156+extern void tok_show(register struct token *t); /* display (composite) token */
157 extern struct token *tok_class(); /* classify tokens */
158-extern void tok_unget(); /* stuff token back into input */
159+extern void tok_unget(register struct token *t); /* stuff token back into input */
160 extern void put_nl(); /* print newline character */
161-extern void tok_show_ch(); /* emit single-character token */
162+extern void tok_show_ch(register struct token *t); /* emit single-character token */
163
164 #define tok_flush(t) (tok_show(t), tok_free(t))
165
166@@ -46,7 +46,7 @@
167 /* Memory management */
168
169 struct token *tok_alloc(); /* allocate token storage */
170-extern void tok_free(); /* re-cycle storage */
171+extern void tok_free(register struct token *t); /* re-cycle storage */
172
173 /* Context */
174
175diff --git a/unproto/unproto.c b/unproto/unproto.c
176index 18fc2aaecf..802b91dd3e 100644
177--- a/unproto/unproto.c
178+++ b/unproto/unproto.c
179@@ -140,7 +140,7 @@
180 #include <errno.h>
181 #include <string.h>
182
183-extern void exit();
184+extern void exit(int status);
185 extern int optind;
186 extern char *optarg;
187 extern int getopt();
188@@ -159,16 +159,16 @@
189
190 /* Forward declarations. */
191
192-static struct token *dcl_flush();
193-static void block_flush();
194+static struct token *dcl_flush(register struct token *t);
195+static void block_flush(register struct token *t);
196 static void block_dcls();
197-static struct token *show_func_ptr_type();
198-static struct token *show_struct_type();
199-static void show_arg_name();
200-static void show_type();
201-static void pair_flush();
202-static void check_cast();
203-static void show_empty_list();
204+static struct token *show_func_ptr_type(struct token *t1, struct token *t2);
205+static struct token *show_struct_type(register struct token *p);
206+static void show_arg_name(register struct token *s);
207+static void show_type(register struct token *s);
208+static void pair_flush(register struct token *t, register int start, register int stop);
209+static void check_cast(struct token *t);
210+static void show_empty_list(register struct token *t);
211
212 #define check_cast_flush(t) (check_cast(t), tok_free(t))
213
214diff --git a/unproto/vstring.c b/unproto/vstring.c
215index 220bd530fe..ef9bcffa3c 100644
216--- a/unproto/vstring.c
217+++ b/unproto/vstring.c
218@@ -67,8 +67,8 @@
219
220 /* C library */
221
222-extern char *malloc();
223-extern char *realloc();
224+extern char *malloc(long size);
225+extern char *realloc(char *p, long size);
226
227 /* Application-specific stuff */
228
229diff --git a/unproto/vstring.h b/unproto/vstring.h
230index c2e1f88a77..16a17aa815 100644
231--- a/unproto/vstring.h
232+++ b/unproto/vstring.h
233@@ -5,9 +5,9 @@
234 char *last; /* last position */
235 };
236
237-extern struct vstring *vs_alloc(); /* initial allocation */
238-extern char *vs_realloc(); /* string extension */
239-extern char *vs_strcpy(); /* copy string */
240+extern struct vstring *vs_alloc(int len); /* initial allocation */
241+extern char *vs_realloc(register struct vstring *vp, char *cp); /* string extension */
242+extern char *vs_strcpy(register struct vstring *vp, register char *dst, register char *src); /* copy string */
243
244 /* macro to add one character to auto-resized string */
245