Mercurial > emacs
diff lib-src/etags.c @ 55408:1c425ce93ce9
(GOOD, BAD): Delete macros. Throughout,
replace w/ `EXIT_SUCCESS' and `EXIT_FAILURE', respectively.
(main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Fri, 07 May 2004 15:29:22 +0000 |
parents | c6c2d0694257 |
children | c2ab1ac6a36b 4c90ffeb71c5 |
line wrap: on
line diff
--- a/lib-src/etags.c Fri May 07 15:06:42 2004 +0000 +++ b/lib-src/etags.c Fri May 07 15:29:22 2004 +0000 @@ -177,15 +177,6 @@ # define CTAGS FALSE #endif -/* Exit codes for success and failure. */ -#ifdef VMS -# define GOOD 1 -# define BAD 0 -#else -# define GOOD 0 -# define BAD 1 -#endif - #define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) #define strcaseeq(s,t) (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t)) #define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) @@ -830,7 +821,7 @@ puts ("Copyright (C) 2002 Free Software Foundation, Inc. and Ken Arnold"); puts ("This program is distributed under the same terms as Emacs"); - exit (GOOD); + exit (EXIT_SUCCESS); } static void @@ -849,7 +840,7 @@ } if (help_for_lang) - exit (GOOD); + exit (EXIT_SUCCESS); printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ \n\ @@ -990,7 +981,7 @@ puts (""); puts ("Report bugs to bug-gnu-emacs@gnu.org"); - exit (GOOD); + exit (EXIT_SUCCESS); } @@ -1413,7 +1404,7 @@ if (fclose (tagf) == EOF) pfatal (tagfile); - exit (GOOD); + exit (EXIT_SUCCESS); } if (update) @@ -1432,7 +1423,7 @@ sprintf (cmd, "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS", tagfile, argbuffer[i].what, tagfile); - if (system (cmd) != GOOD) + if (system (cmd) != EXIT_SUCCESS) fatal ("failed to execute shell command", (char *)NULL); } append_to_tagfile = TRUE; @@ -1453,7 +1444,7 @@ sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile); exit (system (cmd)); } - return GOOD; + return EXIT_SUCCESS; } @@ -6470,7 +6461,7 @@ char *s1, *s2; { error (s1, s2); - exit (BAD); + exit (EXIT_FAILURE); } static void @@ -6478,7 +6469,7 @@ char *s1; { perror (s1); - exit (BAD); + exit (EXIT_FAILURE); } static void @@ -6492,7 +6483,7 @@ fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", progname, "-h"); #endif - exit (BAD); + exit (EXIT_FAILURE); } /* Print error message. `s1' is printf control string, `s2' is arg for it. */ @@ -6788,3 +6779,5 @@ /* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051 (do not change this comment) */ + +/* etags.c ends here */