diff options
| author | Dan Nicolaescu | 2010-07-02 17:50:23 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-02 17:50:23 -0700 |
| commit | 873fbd0b84997863af25e3ddae23b6c078a3e6f5 (patch) | |
| tree | c128a27ee29666a3d1acb584bc5eab96a047e067 /lib-src/b2m.c | |
| parent | a6ed0e289873ac982d7a9b0215d17a4626375b43 (diff) | |
| download | emacs-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.c | 23 |
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 | ||
| 67 | extern char *strtok(); | 67 | extern char *strtok(char *, const char *); |
| 68 | 68 | ||
| 69 | long *xmalloc (unsigned int size); | 69 | long *xmalloc (unsigned int size); |
| 70 | long *xrealloc (char *ptr, unsigned int size); | 70 | long *xrealloc (char *ptr, unsigned int size); |
| @@ -91,9 +91,7 @@ struct option longopts[] = | |||
| 91 | extern int optind; | 91 | extern int optind; |
| 92 | 92 | ||
| 93 | int | 93 | int |
| 94 | main (argc, argv) | 94 | main (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 | */ |
| 222 | char * | 220 | char * |
| 223 | concat (s1, s2, s3) | 221 | concat (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 | */ |
| 242 | long | 239 | long |
| 243 | readline (linebuffer, stream) | 240 | readline (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 | */ |
| 294 | long * | 289 | long * |
| 295 | xmalloc (size) | 290 | xmalloc (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 | ||
| 304 | long * | 298 | long * |
| 305 | xrealloc (ptr, size) | 299 | xrealloc (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 | ||
| 315 | void | 307 | void |
| 316 | fatal (message) | 308 | fatal (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); |