aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/b2m.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/b2m.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/b2m.c')
-rw-r--r--lib-src/b2m.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/lib-src/b2m.c b/lib-src/b2m.c
index 2741a984093..733cd276653 100644
--- a/lib-src/b2m.c
+++ b/lib-src/b2m.c
@@ -64,7 +64,7 @@ struct linebuffer
64 char *buffer; 64 char *buffer;
65}; 65};
66 66
67extern char *strtok(); 67extern char *strtok(char *, const char *);
68 68
69long *xmalloc (unsigned int size); 69long *xmalloc (unsigned int size);
70long *xrealloc (char *ptr, unsigned int size); 70long *xrealloc (char *ptr, unsigned int size);
@@ -91,9 +91,7 @@ struct option longopts[] =
91extern int optind; 91extern int optind;
92 92
93int 93int
94main (argc, argv) 94main (int argc, char **argv)
95 int argc;
96 char **argv;
97{ 95{
98 logical labels_saved, printing, header, first, last_was_blank_line; 96 logical labels_saved, printing, header, first, last_was_blank_line;
99 time_t ltoday; 97 time_t ltoday;
@@ -220,8 +218,7 @@ main (argc, argv)
220 * concatenate those of s1, s2, s3. 218 * concatenate those of s1, s2, s3.
221 */ 219 */
222char * 220char *
223concat (s1, s2, s3) 221concat (char *s1, char *s2, char *s3)
224 char *s1, *s2, *s3;
225{ 222{
226 int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); 223 int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
227 char *result = xnew (len1 + len2 + len3 + 1, char); 224 char *result = xnew (len1 + len2 + len3 + 1, char);
@@ -240,9 +237,7 @@ concat (s1, s2, s3)
240 * which is the length of the line including the newline, if any. 237 * which is the length of the line including the newline, if any.
241 */ 238 */
242long 239long
243readline (linebuffer, stream) 240readline (struct linebuffer *linebuffer, register FILE *stream)
244 struct linebuffer *linebuffer;
245 register FILE *stream;
246{ 241{
247 char *buffer = linebuffer->buffer; 242 char *buffer = linebuffer->buffer;
248 register char *p = linebuffer->buffer; 243 register char *p = linebuffer->buffer;
@@ -292,8 +287,7 @@ readline (linebuffer, stream)
292 * Like malloc but get fatal error if memory is exhausted. 287 * Like malloc but get fatal error if memory is exhausted.
293 */ 288 */
294long * 289long *
295xmalloc (size) 290xmalloc (unsigned int size)
296 unsigned int size;
297{ 291{
298 long *result = (long *) malloc (size); 292 long *result = (long *) malloc (size);
299 if (result == NULL) 293 if (result == NULL)
@@ -302,9 +296,7 @@ xmalloc (size)
302} 296}
303 297
304long * 298long *
305xrealloc (ptr, size) 299xrealloc (char *ptr, unsigned int size)
306 char *ptr;
307 unsigned int size;
308{ 300{
309 long *result = (long *) realloc (ptr, size); 301 long *result = (long *) realloc (ptr, size);
310 if (result == NULL) 302 if (result == NULL)
@@ -313,8 +305,7 @@ xrealloc (ptr, size)
313} 305}
314 306
315void 307void
316fatal (message) 308fatal (char *message)
317 char *message;
318{ 309{
319 fprintf (stderr, "%s: %s\n", progname, message); 310 fprintf (stderr, "%s: %s\n", progname, message);
320 exit (EXIT_FAILURE); 311 exit (EXIT_FAILURE);