diff options
| author | Karoly Lorentey | 2004-05-11 09:11:36 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-05-11 09:11:36 +0000 |
| commit | ab4b17bed77ba635b5654accdfde3fbdf125f3e6 (patch) | |
| tree | 69bb5c993b157473ee83d40b4d2f3810661c2beb /lib-src | |
| parent | f4d07503cab876a7e0eaab4701674f7e7f8279e5 (diff) | |
| parent | 88214ef69ef9698b96644d61f0580dca89f70924 (diff) | |
| download | emacs-ab4b17bed77ba635b5654accdfde3fbdf125f3e6.tar.gz emacs-ab4b17bed77ba635b5654accdfde3fbdf125f3e6.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-290
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-161
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 14 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 4 | ||||
| -rw-r--r-- | lib-src/cvtmail.c | 8 | ||||
| -rw-r--r-- | lib-src/ebrowse.c | 17 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 27 | ||||
| -rw-r--r-- | lib-src/fakemail.c | 8 | ||||
| -rw-r--r-- | lib-src/hexl.c | 6 | ||||
| -rw-r--r-- | lib-src/make-docfile.c | 4 | ||||
| -rw-r--r-- | lib-src/movemail.c | 40 | ||||
| -rw-r--r-- | lib-src/profile.c | 8 | ||||
| -rw-r--r-- | lib-src/sorted-doc.c | 6 | ||||
| -rw-r--r-- | lib-src/test-distrib.c | 7 | ||||
| -rw-r--r-- | lib-src/update-game-score.c | 14 | ||||
| -rw-r--r-- | lib-src/yow.c | 10 |
14 files changed, 101 insertions, 72 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 75d5f964201..8c641f45ae7 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2004-05-08 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 2 | |||
| 3 | * cvtmail.c: Throughout, replace 0 destined for `exit' arg | ||
| 4 | with `EXIT_SUCCESS'. Likewise, replace 1 with `EXIT_FAILURE'. | ||
| 5 | (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value. | ||
| 6 | |||
| 7 | * ebrowse.c, emacsclient.c, fakemail.c, hexl.c, | ||
| 8 | make-docfile.c, movemail.c, profile.c, sorted-doc.c, | ||
| 9 | test-distrib.c, update-game-score.c, yow.c: Likewise. | ||
| 10 | |||
| 11 | 2004-05-08 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 12 | |||
| 13 | * Makefile.in (emacsclient${EXEEXT}): Use makefile var `version'. | ||
| 14 | |||
| 1 | 2004-05-07 Thien-Thi Nguyen <ttn@gnu.org> | 15 | 2004-05-07 Thien-Thi Nguyen <ttn@gnu.org> |
| 2 | 16 | ||
| 3 | * b2m.c (GOOD, BAD): Delete macros. Throughout, | 17 | * b2m.c (GOOD, BAD): Delete macros. Throughout, |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 7868364148a..1da04d88b82 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Makefile for lib-src subdirectory in GNU Emacs. | 1 | # Makefile for lib-src subdirectory in GNU Emacs. |
| 2 | # Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003 | 2 | # Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003, 2004 |
| 3 | # Free Software Foundation, Inc. | 3 | # Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | # This file is part of GNU Emacs. | 5 | # This file is part of GNU Emacs. |
| @@ -447,7 +447,7 @@ yow${EXEEXT}: ${srcdir}/yow.c ../src/epaths.h | |||
| 447 | 447 | ||
| 448 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) | 448 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) |
| 449 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ | 449 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ |
| 450 | -DVERSION=`sed -n -e '/(defconst emacs-version/ s/^[^"]*\("[^"]*"\).*/\1/p' ${srcdir}/../lisp/version.el` \ | 450 | -DVERSION="\"${version}\"" \ |
| 451 | $(LOADLIBES) -o emacsclient | 451 | $(LOADLIBES) -o emacsclient |
| 452 | 452 | ||
| 453 | hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h | 453 | hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h |
diff --git a/lib-src/cvtmail.c b/lib-src/cvtmail.c index 28a4ae4c703..8992b3f9e80 100644 --- a/lib-src/cvtmail.c +++ b/lib-src/cvtmail.c | |||
| @@ -119,7 +119,7 @@ main (argc, argv) | |||
| 119 | } | 119 | } |
| 120 | fclose (mddf); | 120 | fclose (mddf); |
| 121 | fclose (mfilef); | 121 | fclose (mfilef); |
| 122 | return 0; | 122 | return EXIT_SUCCESS; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void | 125 | void |
| @@ -148,7 +148,7 @@ fatal (s1, s2) | |||
| 148 | char *s1, *s2; | 148 | char *s1, *s2; |
| 149 | { | 149 | { |
| 150 | error (s1, s2); | 150 | error (s1, s2); |
| 151 | exit (1); | 151 | exit (EXIT_FAILURE); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | void | 154 | void |
| @@ -157,7 +157,7 @@ sysfail (s) | |||
| 157 | { | 157 | { |
| 158 | fprintf (stderr, "cvtmail: "); | 158 | fprintf (stderr, "cvtmail: "); |
| 159 | perror (s); | 159 | perror (s); |
| 160 | exit (1); | 160 | exit (EXIT_FAILURE); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | char * | 163 | char * |
| @@ -183,3 +183,5 @@ xrealloc (ptr, size) | |||
| 183 | 183 | ||
| 184 | /* arch-tag: b93c25a9-9012-44f1-b78b-9cc7aed44a7a | 184 | /* arch-tag: b93c25a9-9012-44f1-b78b-9cc7aed44a7a |
| 185 | (do not change this comment) */ | 185 | (do not change this comment) */ |
| 186 | |||
| 187 | /* cvtmail.c ends here */ | ||
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index eeeb0eb3efd..4ad45d195f6 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c | |||
| @@ -564,7 +564,7 @@ xmalloc (nbytes) | |||
| 564 | if (p == NULL) | 564 | if (p == NULL) |
| 565 | { | 565 | { |
| 566 | yyerror ("out of memory", NULL); | 566 | yyerror ("out of memory", NULL); |
| 567 | exit (1); | 567 | exit (EXIT_FAILURE); |
| 568 | } | 568 | } |
| 569 | return p; | 569 | return p; |
| 570 | } | 570 | } |
| @@ -581,7 +581,7 @@ xrealloc (p, sz) | |||
| 581 | if (p == NULL) | 581 | if (p == NULL) |
| 582 | { | 582 | { |
| 583 | yyerror ("out of memory", NULL); | 583 | yyerror ("out of memory", NULL); |
| 584 | exit (1); | 584 | exit (EXIT_FAILURE); |
| 585 | } | 585 | } |
| 586 | return p; | 586 | return p; |
| 587 | } | 587 | } |
| @@ -3671,7 +3671,7 @@ usage (error) | |||
| 3671 | int error; | 3671 | int error; |
| 3672 | { | 3672 | { |
| 3673 | puts (USAGE); | 3673 | puts (USAGE); |
| 3674 | exit (error ? 1 : 0); | 3674 | exit (error ? EXIT_FAILURE : EXIT_SUCCESS); |
| 3675 | } | 3675 | } |
| 3676 | 3676 | ||
| 3677 | 3677 | ||
| @@ -3688,7 +3688,7 @@ version () | |||
| 3688 | printf ("ebrowse %s\n", VERSION); | 3688 | printf ("ebrowse %s\n", VERSION); |
| 3689 | puts ("Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc."); | 3689 | puts ("Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc."); |
| 3690 | puts ("This program is distributed under the same terms as Emacs."); | 3690 | puts ("This program is distributed under the same terms as Emacs."); |
| 3691 | exit (0); | 3691 | exit (EXIT_SUCCESS); |
| 3692 | } | 3692 | } |
| 3693 | 3693 | ||
| 3694 | 3694 | ||
| @@ -3925,7 +3925,7 @@ main (argc, argv) | |||
| 3925 | if (yyout == NULL) | 3925 | if (yyout == NULL) |
| 3926 | { | 3926 | { |
| 3927 | yyerror ("cannot open output file `%s'", out_filename); | 3927 | yyerror ("cannot open output file `%s'", out_filename); |
| 3928 | exit (1); | 3928 | exit (EXIT_FAILURE); |
| 3929 | } | 3929 | } |
| 3930 | } | 3930 | } |
| 3931 | 3931 | ||
| @@ -3970,11 +3970,10 @@ main (argc, argv) | |||
| 3970 | if (yyout != stdout) | 3970 | if (yyout != stdout) |
| 3971 | fclose (yyout); | 3971 | fclose (yyout); |
| 3972 | 3972 | ||
| 3973 | return 0; | 3973 | return EXIT_SUCCESS; |
| 3974 | } | 3974 | } |
| 3975 | 3975 | ||
| 3976 | |||
| 3977 | /* ebrowse.c ends here. */ | ||
| 3978 | |||
| 3979 | /* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8 | 3976 | /* arch-tag: fc03b4bc-91a9-4c3d-b3b9-12a77fa86dd8 |
| 3980 | (do not change this comment) */ | 3977 | (do not change this comment) */ |
| 3978 | |||
| 3979 | /* ebrowse.c ends here */ | ||
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 92f19d4746c..a241a17eb60 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -48,9 +48,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 48 | char *getenv (), *getwd (); | 48 | char *getenv (), *getwd (); |
| 49 | char *getcwd (); | 49 | char *getcwd (); |
| 50 | 50 | ||
| 51 | /* This is defined with -D from the compilation command, | ||
| 52 | which extracts it from ../lisp/version.el. */ | ||
| 53 | |||
| 54 | #ifndef VERSION | 51 | #ifndef VERSION |
| 55 | #define VERSION "unspecified" | 52 | #define VERSION "unspecified" |
| 56 | #endif | 53 | #endif |
| @@ -157,7 +154,7 @@ decode_options (argc, argv) | |||
| 157 | 154 | ||
| 158 | case 'V': | 155 | case 'V': |
| 159 | printf ("emacsclient %s\n", VERSION); | 156 | printf ("emacsclient %s\n", VERSION); |
| 160 | exit (0); | 157 | exit (EXIT_SUCCESS); |
| 161 | break; | 158 | break; |
| 162 | 159 | ||
| 163 | case 't': | 160 | case 't': |
| @@ -176,7 +173,7 @@ decode_options (argc, argv) | |||
| 176 | 173 | ||
| 177 | default: | 174 | default: |
| 178 | fprintf (stderr, "Try `%s --help' for more information\n", progname); | 175 | fprintf (stderr, "Try `%s --help' for more information\n", progname); |
| 179 | exit (1); | 176 | exit (EXIT_FAILURE); |
| 180 | break; | 177 | break; |
| 181 | } | 178 | } |
| 182 | } | 179 | } |
| @@ -209,7 +206,7 @@ The following OPTIONS are accepted:\n\ | |||
| 209 | Editor to fallback to if the server is not running\n\ | 206 | Editor to fallback to if the server is not running\n\ |
| 210 | \n\ | 207 | \n\ |
| 211 | Report bugs to bug-gnu-emacs@gnu.org.\n", progname); | 208 | Report bugs to bug-gnu-emacs@gnu.org.\n", progname); |
| 212 | exit (0); | 209 | exit (EXIT_SUCCESS); |
| 213 | } | 210 | } |
| 214 | 211 | ||
| 215 | /* Like malloc but get fatal error if memory is exhausted. */ | 212 | /* Like malloc but get fatal error if memory is exhausted. */ |
| @@ -222,7 +219,7 @@ xmalloc (size) | |||
| 222 | if (result == NULL) | 219 | if (result == NULL) |
| 223 | { | 220 | { |
| 224 | perror ("malloc"); | 221 | perror ("malloc"); |
| 225 | exit (1); | 222 | exit (EXIT_FAILURE); |
| 226 | } | 223 | } |
| 227 | return result; | 224 | return result; |
| 228 | } | 225 | } |
| @@ -236,7 +233,7 @@ xstrdup (const char *s) | |||
| 236 | if (result == NULL) | 233 | if (result == NULL) |
| 237 | { | 234 | { |
| 238 | perror ("strdup"); | 235 | perror ("strdup"); |
| 239 | exit (1); | 236 | exit (EXIT_FAILURE); |
| 240 | } | 237 | } |
| 241 | return result; | 238 | return result; |
| 242 | } | 239 | } |
| @@ -336,7 +333,7 @@ fail (void) | |||
| 336 | } | 333 | } |
| 337 | else | 334 | else |
| 338 | { | 335 | { |
| 339 | exit (1); | 336 | exit (EXIT_FAILURE); |
| 340 | } | 337 | } |
| 341 | } | 338 | } |
| 342 | 339 | ||
| @@ -520,7 +517,7 @@ main (argc, argv) | |||
| 520 | { | 517 | { |
| 521 | fprintf (stderr, "%s: file name or argument required\n", progname); | 518 | fprintf (stderr, "%s: file name or argument required\n", progname); |
| 522 | fprintf (stderr, "Try `%s --help' for more information\n", progname); | 519 | fprintf (stderr, "Try `%s --help' for more information\n", progname); |
| 523 | exit (1); | 520 | exit (EXIT_FAILURE); |
| 524 | } | 521 | } |
| 525 | 522 | ||
| 526 | /* | 523 | /* |
| @@ -598,7 +595,7 @@ main (argc, argv) | |||
| 598 | { | 595 | { |
| 599 | fprintf (stderr, "%s: socket-name %s too long", | 596 | fprintf (stderr, "%s: socket-name %s too long", |
| 600 | argv[0], socket_name); | 597 | argv[0], socket_name); |
| 601 | exit (1); | 598 | exit (EXIT_FAILURE); |
| 602 | } | 599 | } |
| 603 | 600 | ||
| 604 | sock_status = socket_status (server.sun_path); | 601 | sock_status = socket_status (server.sun_path); |
| @@ -819,9 +816,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 819 | 816 | ||
| 820 | /* Maybe wait for an answer. */ | 817 | /* Maybe wait for an answer. */ |
| 821 | if (nowait) | 818 | if (nowait) |
| 822 | { | 819 | return EXIT_SUCCESS; |
| 823 | return 0; | ||
| 824 | } | ||
| 825 | 820 | ||
| 826 | if (!eval && !tty) | 821 | if (!eval && !tty) |
| 827 | { | 822 | { |
| @@ -883,7 +878,7 @@ To start the server in Emacs, type \"M-x server-start\".\n", | |||
| 883 | fflush (stdout); | 878 | fflush (stdout); |
| 884 | fsync (1); | 879 | fsync (1); |
| 885 | 880 | ||
| 886 | return 0; | 881 | return EXIT_SUCCESS; |
| 887 | } | 882 | } |
| 888 | 883 | ||
| 889 | #endif /* HAVE_SOCKETS */ | 884 | #endif /* HAVE_SOCKETS */ |
| @@ -905,3 +900,5 @@ strerror (errnum) | |||
| 905 | 900 | ||
| 906 | /* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7 | 901 | /* arch-tag: f39bb9c4-73eb-477e-896d-50832e2ca9a7 |
| 907 | (do not change this comment) */ | 902 | (do not change this comment) */ |
| 903 | |||
| 904 | /* emacsclient.c ends here */ | ||
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index 944a728a28c..cee7eaa130e 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c | |||
| @@ -169,7 +169,7 @@ fatal (s1, s2) | |||
| 169 | char *s1, *s2; | 169 | char *s1, *s2; |
| 170 | { | 170 | { |
| 171 | error (s1, s2); | 171 | error (s1, s2); |
| 172 | exit (1); | 172 | exit (EXIT_FAILURE); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | /* Like malloc but get fatal error if memory is exhausted. */ | 175 | /* Like malloc but get fatal error if memory is exhausted. */ |
| @@ -410,7 +410,7 @@ close_the_streams () | |||
| 410 | no_problems = (no_problems && | 410 | no_problems = (no_problems && |
| 411 | ((*rem->action) (rem->handle) == 0)); | 411 | ((*rem->action) (rem->handle) == 0)); |
| 412 | the_streams = ((stream_list) NULL); | 412 | the_streams = ((stream_list) NULL); |
| 413 | return (no_problems ? 0 : 1); | 413 | return (no_problems ? EXIT_SUCCESS : EXIT_FAILURE); |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | void | 416 | void |
| @@ -667,7 +667,7 @@ read_header () | |||
| 667 | if (next_line == ((line_list *) NULL)) | 667 | if (next_line == ((line_list *) NULL)) |
| 668 | { | 668 | { |
| 669 | /* Not a valid header */ | 669 | /* Not a valid header */ |
| 670 | exit (1); | 670 | exit (EXIT_FAILURE); |
| 671 | } | 671 | } |
| 672 | *next_line = new_list (); | 672 | *next_line = new_list (); |
| 673 | (*next_line)->string = alloc_string (length); | 673 | (*next_line)->string = alloc_string (length); |
| @@ -753,3 +753,5 @@ main (argc, argv) | |||
| 753 | 753 | ||
| 754 | /* arch-tag: acb0afa6-315a-4c5b-b9e3-def5725c8783 | 754 | /* arch-tag: acb0afa6-315a-4c5b-b9e3-def5725c8783 |
| 755 | (do not change this comment) */ | 755 | (do not change this comment) */ |
| 756 | |||
| 757 | /* fakemail.c ends here */ | ||
diff --git a/lib-src/hexl.c b/lib-src/hexl.c index 0cfb88445b3..5ca7c2a5b8a 100644 --- a/lib-src/hexl.c +++ b/lib-src/hexl.c | |||
| @@ -270,15 +270,17 @@ main (argc, argv) | |||
| 270 | fclose (fp); | 270 | fclose (fp); |
| 271 | 271 | ||
| 272 | } while (*argv != NULL); | 272 | } while (*argv != NULL); |
| 273 | return 0; | 273 | return EXIT_SUCCESS; |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | void | 276 | void |
| 277 | usage () | 277 | usage () |
| 278 | { | 278 | { |
| 279 | fprintf (stderr, "usage: %s [-de] [-iso]\n", progname); | 279 | fprintf (stderr, "usage: %s [-de] [-iso]\n", progname); |
| 280 | exit (1); | 280 | exit (EXIT_FAILURE); |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | /* arch-tag: 20e04fb7-926e-4e48-be86-64fe869ecdaa | 283 | /* arch-tag: 20e04fb7-926e-4e48-be86-64fe869ecdaa |
| 284 | (do not change this comment) */ | 284 | (do not change this comment) */ |
| 285 | |||
| 286 | /* hexl.c ends here */ | ||
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 1c0bc559225..802b4e09e67 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -104,7 +104,7 @@ fatal (s1, s2) | |||
| 104 | char *s1, *s2; | 104 | char *s1, *s2; |
| 105 | { | 105 | { |
| 106 | error (s1, s2); | 106 | error (s1, s2); |
| 107 | exit (1); | 107 | exit (EXIT_FAILURE); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | /* Like malloc but get fatal error if memory is exhausted. */ | 110 | /* Like malloc but get fatal error if memory is exhausted. */ |
| @@ -1210,3 +1210,5 @@ scan_lisp_file (filename, mode) | |||
| 1210 | 1210 | ||
| 1211 | /* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894 | 1211 | /* arch-tag: f7203aaf-991a-4238-acb5-601db56f2894 |
| 1212 | (do not change this comment) */ | 1212 | (do not change this comment) */ |
| 1213 | |||
| 1214 | /* make-docfile.c ends here */ | ||
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index 2d0cd9043fd..a634e2966d7 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c | |||
| @@ -216,7 +216,7 @@ main (argc, argv) | |||
| 216 | preserve_mail++; | 216 | preserve_mail++; |
| 217 | break; | 217 | break; |
| 218 | default: | 218 | default: |
| 219 | exit(1); | 219 | exit (EXIT_FAILURE); |
| 220 | } | 220 | } |
| 221 | } | 221 | } |
| 222 | 222 | ||
| @@ -234,7 +234,7 @@ main (argc, argv) | |||
| 234 | #else | 234 | #else |
| 235 | fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n", ""); | 235 | fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n", ""); |
| 236 | #endif | 236 | #endif |
| 237 | exit (1); | 237 | exit (EXIT_FAILURE); |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | inname = argv[optind]; | 240 | inname = argv[optind]; |
| @@ -536,12 +536,12 @@ main (argc, argv) | |||
| 536 | if (spool_name) | 536 | if (spool_name) |
| 537 | mailunlock (); | 537 | mailunlock (); |
| 538 | #endif | 538 | #endif |
| 539 | exit (0); | 539 | exit (EXIT_SUCCESS); |
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | wait (&status); | 542 | wait (&status); |
| 543 | if (!WIFEXITED (status)) | 543 | if (!WIFEXITED (status)) |
| 544 | exit (1); | 544 | exit (EXIT_FAILURE); |
| 545 | else if (WRETCODE (status) != 0) | 545 | else if (WRETCODE (status) != 0) |
| 546 | exit (WRETCODE (status)); | 546 | exit (WRETCODE (status)); |
| 547 | 547 | ||
| @@ -554,7 +554,7 @@ main (argc, argv) | |||
| 554 | 554 | ||
| 555 | #endif /* ! DISABLE_DIRECT_ACCESS */ | 555 | #endif /* ! DISABLE_DIRECT_ACCESS */ |
| 556 | 556 | ||
| 557 | return 0; | 557 | return EXIT_SUCCESS; |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | #ifdef MAIL_USE_MAILLOCK | 560 | #ifdef MAIL_USE_MAILLOCK |
| @@ -607,7 +607,7 @@ fatal (s1, s2) | |||
| 607 | if (delete_lockname) | 607 | if (delete_lockname) |
| 608 | unlink (delete_lockname); | 608 | unlink (delete_lockname); |
| 609 | error (s1, s2, 0); | 609 | error (s1, s2, 0); |
| 610 | exit (1); | 610 | exit (EXIT_FAILURE); |
| 611 | } | 611 | } |
| 612 | 612 | ||
| 613 | /* Print error message. `s1' is printf control string, `s2' and `s3' | 613 | /* Print error message. `s1' is printf control string, `s2' and `s3' |
| @@ -709,6 +709,8 @@ char Errmsg[200]; /* POP errors, at least, can exceed | |||
| 709 | * If the mailbox is in the form "po:username:hostname", then it is | 709 | * If the mailbox is in the form "po:username:hostname", then it is |
| 710 | * modified by this function -- the second colon is replaced by a | 710 | * modified by this function -- the second colon is replaced by a |
| 711 | * null. | 711 | * null. |
| 712 | * | ||
| 713 | * Return a value suitable for passing to `exit'. | ||
| 712 | */ | 714 | */ |
| 713 | 715 | ||
| 714 | int | 716 | int |
| @@ -736,19 +738,19 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 736 | if (! server) | 738 | if (! server) |
| 737 | { | 739 | { |
| 738 | error ("Error connecting to POP server: %s", pop_error, 0); | 740 | error ("Error connecting to POP server: %s", pop_error, 0); |
| 739 | return (1); | 741 | return EXIT_FAILURE; |
| 740 | } | 742 | } |
| 741 | 743 | ||
| 742 | if (pop_stat (server, &nmsgs, &nbytes)) | 744 | if (pop_stat (server, &nmsgs, &nbytes)) |
| 743 | { | 745 | { |
| 744 | error ("Error getting message count from POP server: %s", pop_error, 0); | 746 | error ("Error getting message count from POP server: %s", pop_error, 0); |
| 745 | return (1); | 747 | return EXIT_FAILURE; |
| 746 | } | 748 | } |
| 747 | 749 | ||
| 748 | if (!nmsgs) | 750 | if (!nmsgs) |
| 749 | { | 751 | { |
| 750 | pop_close (server); | 752 | pop_close (server); |
| 751 | return (0); | 753 | return EXIT_SUCCESS; |
| 752 | } | 754 | } |
| 753 | 755 | ||
| 754 | mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666); | 756 | mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666); |
| @@ -756,7 +758,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 756 | { | 758 | { |
| 757 | pop_close (server); | 759 | pop_close (server); |
| 758 | error ("Error in open: %s, %s", strerror (errno), outfile); | 760 | error ("Error in open: %s, %s", strerror (errno), outfile); |
| 759 | return (1); | 761 | return EXIT_FAILURE; |
| 760 | } | 762 | } |
| 761 | fchown (mbfi, getuid (), -1); | 763 | fchown (mbfi, getuid (), -1); |
| 762 | 764 | ||
| @@ -766,7 +768,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 766 | error ("Error in fdopen: %s", strerror (errno), 0); | 768 | error ("Error in fdopen: %s", strerror (errno), 0); |
| 767 | close (mbfi); | 769 | close (mbfi); |
| 768 | unlink (outfile); | 770 | unlink (outfile); |
| 769 | return (1); | 771 | return EXIT_FAILURE; |
| 770 | } | 772 | } |
| 771 | 773 | ||
| 772 | if (reverse_order) | 774 | if (reverse_order) |
| @@ -789,7 +791,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 789 | { | 791 | { |
| 790 | error (Errmsg, 0, 0); | 792 | error (Errmsg, 0, 0); |
| 791 | close (mbfi); | 793 | close (mbfi); |
| 792 | return (1); | 794 | return EXIT_FAILURE; |
| 793 | } | 795 | } |
| 794 | mbx_delimit_end (mbf); | 796 | mbx_delimit_end (mbf); |
| 795 | fflush (mbf); | 797 | fflush (mbf); |
| @@ -798,7 +800,7 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 798 | error ("Error in fflush: %s", strerror (errno), 0); | 800 | error ("Error in fflush: %s", strerror (errno), 0); |
| 799 | pop_close (server); | 801 | pop_close (server); |
| 800 | close (mbfi); | 802 | close (mbfi); |
| 801 | return (1); | 803 | return EXIT_FAILURE; |
| 802 | } | 804 | } |
| 803 | } | 805 | } |
| 804 | 806 | ||
| @@ -812,14 +814,14 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 812 | if (fsync (mbfi) < 0) | 814 | if (fsync (mbfi) < 0) |
| 813 | { | 815 | { |
| 814 | error ("Error in fsync: %s", strerror (errno), 0); | 816 | error ("Error in fsync: %s", strerror (errno), 0); |
| 815 | return (1); | 817 | return EXIT_FAILURE; |
| 816 | } | 818 | } |
| 817 | #endif | 819 | #endif |
| 818 | 820 | ||
| 819 | if (close (mbfi) == -1) | 821 | if (close (mbfi) == -1) |
| 820 | { | 822 | { |
| 821 | error ("Error in close: %s", strerror (errno), 0); | 823 | error ("Error in close: %s", strerror (errno), 0); |
| 822 | return (1); | 824 | return EXIT_FAILURE; |
| 823 | } | 825 | } |
| 824 | 826 | ||
| 825 | if (! preserve) | 827 | if (! preserve) |
| @@ -829,17 +831,17 @@ popmail (mailbox, outfile, preserve, password, reverse_order) | |||
| 829 | { | 831 | { |
| 830 | error ("Error from POP server: %s", pop_error, 0); | 832 | error ("Error from POP server: %s", pop_error, 0); |
| 831 | pop_close (server); | 833 | pop_close (server); |
| 832 | return (1); | 834 | return EXIT_FAILURE; |
| 833 | } | 835 | } |
| 834 | } | 836 | } |
| 835 | 837 | ||
| 836 | if (pop_quit (server)) | 838 | if (pop_quit (server)) |
| 837 | { | 839 | { |
| 838 | error ("Error from POP server: %s", pop_error, 0); | 840 | error ("Error from POP server: %s", pop_error, 0); |
| 839 | return (1); | 841 | return EXIT_FAILURE; |
| 840 | } | 842 | } |
| 841 | 843 | ||
| 842 | return (0); | 844 | return EXIT_SUCCESS; |
| 843 | } | 845 | } |
| 844 | 846 | ||
| 845 | int | 847 | int |
| @@ -957,3 +959,5 @@ strerror (errnum) | |||
| 957 | 959 | ||
| 958 | /* arch-tag: 1c323112-41fe-4fe5-8de9-494de631f73f | 960 | /* arch-tag: 1c323112-41fe-4fe5-8de9-494de631f73f |
| 959 | (do not change this comment) */ | 961 | (do not change this comment) */ |
| 962 | |||
| 963 | /* movemail.c ends here */ | ||
diff --git a/lib-src/profile.c b/lib-src/profile.c index ec77936f74d..8d924532b87 100644 --- a/lib-src/profile.c +++ b/lib-src/profile.c | |||
| @@ -55,7 +55,7 @@ char * | |||
| 55 | get_time () | 55 | get_time () |
| 56 | { | 56 | { |
| 57 | if (watch_not_started) | 57 | if (watch_not_started) |
| 58 | exit (1); /* call reset_watch first ! */ | 58 | exit (EXIT_FAILURE); /* call reset_watch first ! */ |
| 59 | EMACS_GET_TIME (TV2); | 59 | EMACS_GET_TIME (TV2); |
| 60 | EMACS_SUB_TIME (TV2, TV2, TV1); | 60 | EMACS_SUB_TIME (TV2, TV2, TV1); |
| 61 | sprintf (time_string, "%lu.%06lu", (unsigned long)EMACS_SECS (TV2), (unsigned long)EMACS_USECS (TV2)); | 61 | sprintf (time_string, "%lu.%06lu", (unsigned long)EMACS_SECS (TV2), (unsigned long)EMACS_USECS (TV2)); |
| @@ -94,14 +94,16 @@ main () | |||
| 94 | puts (get_time ()); | 94 | puts (get_time ()); |
| 95 | break; | 95 | break; |
| 96 | case 'q': | 96 | case 'q': |
| 97 | exit (0); | 97 | exit (EXIT_SUCCESS); |
| 98 | } | 98 | } |
| 99 | /* Anything remaining on the line is ignored. */ | 99 | /* Anything remaining on the line is ignored. */ |
| 100 | while (c != '\n' && c != EOF) | 100 | while (c != '\n' && c != EOF) |
| 101 | c = getchar (); | 101 | c = getchar (); |
| 102 | } | 102 | } |
| 103 | exit (1); | 103 | exit (EXIT_FAILURE); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /* arch-tag: 8db68f7e-2322-4944-a315-dba349bdbf39 | 106 | /* arch-tag: 8db68f7e-2322-4944-a315-dba349bdbf39 |
| 107 | (do not change this comment) */ | 107 | (do not change this comment) */ |
| 108 | |||
| 109 | /* profile.c ends here */ | ||
diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index 05a3e69cc92..3af3276e811 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c | |||
| @@ -75,7 +75,7 @@ fatal (s1, s2) | |||
| 75 | char *s1, *s2; | 75 | char *s1, *s2; |
| 76 | { | 76 | { |
| 77 | error (s1, s2); | 77 | error (s1, s2); |
| 78 | exit (1); | 78 | exit (EXIT_FAILURE); |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | /* Like malloc but get fatal error if memory is exhausted. */ | 81 | /* Like malloc but get fatal error if memory is exhausted. */ |
| @@ -279,8 +279,10 @@ main () | |||
| 279 | printf ("@bye\n"); | 279 | printf ("@bye\n"); |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | return 0; | 282 | return EXIT_SUCCESS; |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | /* arch-tag: ce28f204-1e70-4b34-8210-3d54a5662071 | 285 | /* arch-tag: ce28f204-1e70-4b34-8210-3d54a5662071 |
| 286 | (do not change this comment) */ | 286 | (do not change this comment) */ |
| 287 | |||
| 288 | /* sorted-doc.c ends here */ | ||
diff --git a/lib-src/test-distrib.c b/lib-src/test-distrib.c index f7b3a8b8004..97e87695c7c 100644 --- a/lib-src/test-distrib.c +++ b/lib-src/test-distrib.c | |||
| @@ -100,11 +100,10 @@ have been corrupted in the files of Emacs, and it will not work.\n", | |||
| 100 | exit (2); | 100 | exit (2); |
| 101 | } | 101 | } |
| 102 | close (fd); | 102 | close (fd); |
| 103 | #ifdef VMS | 103 | return EXIT_SUCCESS; |
| 104 | exit (1); /* On VMS, success is 1. */ | ||
| 105 | #endif | ||
| 106 | return (0); | ||
| 107 | } | 104 | } |
| 108 | 105 | ||
| 109 | /* arch-tag: 3a89005d-df98-4c32-aa9f-33570e16a26a | 106 | /* arch-tag: 3a89005d-df98-4c32-aa9f-33570e16a26a |
| 110 | (do not change this comment) */ | 107 | (do not change this comment) */ |
| 108 | |||
| 109 | /* test-distrib.c ends here */ | ||
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 74fa2b06920..8f7c90cad55 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c | |||
| @@ -111,7 +111,7 @@ lose (msg) | |||
| 111 | const char *msg; | 111 | const char *msg; |
| 112 | { | 112 | { |
| 113 | fprintf (stderr, "%s\n", msg); | 113 | fprintf (stderr, "%s\n", msg); |
| 114 | exit (1); | 114 | exit (EXIT_FAILURE); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | void lose_syserr P_ ((const char *msg)) NO_RETURN; | 117 | void lose_syserr P_ ((const char *msg)) NO_RETURN; |
| @@ -138,7 +138,7 @@ lose_syserr (msg) | |||
| 138 | const char *msg; | 138 | const char *msg; |
| 139 | { | 139 | { |
| 140 | fprintf (stderr, "%s: %s\n", msg, strerror (errno)); | 140 | fprintf (stderr, "%s: %s\n", msg, strerror (errno)); |
| 141 | exit (1); | 141 | exit (EXIT_FAILURE); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | char * | 144 | char * |
| @@ -199,7 +199,7 @@ main (argc, argv) | |||
| 199 | switch (c) | 199 | switch (c) |
| 200 | { | 200 | { |
| 201 | case 'h': | 201 | case 'h': |
| 202 | usage (0); | 202 | usage (EXIT_SUCCESS); |
| 203 | break; | 203 | break; |
| 204 | case 'd': | 204 | case 'd': |
| 205 | user_prefix = optarg; | 205 | user_prefix = optarg; |
| @@ -213,11 +213,11 @@ main (argc, argv) | |||
| 213 | max = MAX_SCORES; | 213 | max = MAX_SCORES; |
| 214 | break; | 214 | break; |
| 215 | default: | 215 | default: |
| 216 | usage (1); | 216 | usage (EXIT_FAILURE); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | if (optind+3 != argc) | 219 | if (optind+3 != argc) |
| 220 | usage (1); | 220 | usage (EXIT_FAILURE); |
| 221 | 221 | ||
| 222 | running_suid = (getuid () != geteuid ()); | 222 | running_suid = (getuid () != geteuid ()); |
| 223 | 223 | ||
| @@ -266,7 +266,7 @@ main (argc, argv) | |||
| 266 | lose_syserr ("Failed to write scores file"); | 266 | lose_syserr ("Failed to write scores file"); |
| 267 | } | 267 | } |
| 268 | unlock_file (scorefile, lockstate); | 268 | unlock_file (scorefile, lockstate); |
| 269 | exit (0); | 269 | exit (EXIT_SUCCESS); |
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | int | 272 | int |
| @@ -531,3 +531,5 @@ unlock_file (filename, state) | |||
| 531 | 531 | ||
| 532 | /* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b | 532 | /* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b |
| 533 | (do not change this comment) */ | 533 | (do not change this comment) */ |
| 534 | |||
| 535 | /* update-game-score.c ends here */ | ||
diff --git a/lib-src/yow.c b/lib-src/yow.c index 10f0fad1ce7..9d58ce5aecb 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c | |||
| @@ -73,7 +73,7 @@ main (argc, argv) | |||
| 73 | if ((fp = fopen(file, "r")) == NULL) { | 73 | if ((fp = fopen(file, "r")) == NULL) { |
| 74 | fprintf(stderr, "yow: "); | 74 | fprintf(stderr, "yow: "); |
| 75 | perror(file); | 75 | perror(file); |
| 76 | exit(1); | 76 | exit(EXIT_FAILURE); |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | /* initialize random seed */ | 79 | /* initialize random seed */ |
| @@ -82,7 +82,7 @@ main (argc, argv) | |||
| 82 | setup_yow(fp); | 82 | setup_yow(fp); |
| 83 | yow(fp); | 83 | yow(fp); |
| 84 | fclose(fp); | 84 | fclose(fp); |
| 85 | return 0; | 85 | return EXIT_SUCCESS; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static long len = -1; | 88 | static long len = -1; |
| @@ -113,7 +113,7 @@ setup_yow(fp) | |||
| 113 | 113 | ||
| 114 | if (fseek(fp, 0L, 2) == -1) { | 114 | if (fseek(fp, 0L, 2) == -1) { |
| 115 | perror("yow"); | 115 | perror("yow"); |
| 116 | exit(1); | 116 | exit(EXIT_FAILURE); |
| 117 | } | 117 | } |
| 118 | len = ftell(fp) - header_len; | 118 | len = ftell(fp) - header_len; |
| 119 | } | 119 | } |
| @@ -132,7 +132,7 @@ yow (fp) | |||
| 132 | offset = rand() % len + header_len; | 132 | offset = rand() % len + header_len; |
| 133 | if (fseek(fp, offset, 0) == -1) { | 133 | if (fseek(fp, offset, 0) == -1) { |
| 134 | perror("yow"); | 134 | perror("yow"); |
| 135 | exit(1); | 135 | exit(EXIT_FAILURE); |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | /* Read until SEP, read next line, print it. | 138 | /* Read until SEP, read next line, print it. |
| @@ -180,3 +180,5 @@ yow (fp) | |||
| 180 | 180 | ||
| 181 | /* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e | 181 | /* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e |
| 182 | (do not change this comment) */ | 182 | (do not change this comment) */ |
| 183 | |||
| 184 | /* yow.c ends here */ | ||