summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2004-05-07 15:31:07 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2004-05-07 15:31:07 +0000
commit3f0656ff20abbcd328175e055ae0ecd77acd6ce6 (patch)
treeb314e12141d2391e599315b5bae02993b1b7dab3 /lib-src
parentbef96454bf4b3f03410410f53fa269d67e6c8620 (diff)
downloademacs-3f0656ff20abbcd328175e055ae0ecd77acd6ce6.tar.gz
(GOOD, BAD): Delete macros. Throughout,
replace w/ `EXIT_SUCCESS' and `EXIT_FAILURE', respectively. (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog8
-rw-r--r--lib-src/b2m.c21
-rw-r--r--lib-src/etags.c29
3 files changed, 26 insertions, 32 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index b280abc4111..75d5f964201 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,11 @@
+2004-05-07 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * b2m.c (GOOD, BAD): Delete macros. Throughout,
+ replace w/ `EXIT_SUCCESS' and `EXIT_FAILURE', respectively.
+ (main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.
+
+ * etags.c: Likewise.
+
2004-05-03 Jason Rumney <jasonr@gnu.org>
* makefile.nt: Remove.
diff --git a/lib-src/b2m.c b/lib-src/b2m.c
index 5a1f9e85473..5bebe560e2a 100644
--- a/lib-src/b2m.c
+++ b/lib-src/b2m.c
@@ -39,15 +39,6 @@
#undef FALSE
#define FALSE 0
-/* 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) (strcmp (s, t) == 0)
#define strneq(s,t,n) (strncmp (s, t, n) == 0)
@@ -124,18 +115,18 @@ main (argc, argv)
case 'V':
printf ("%s (GNU Emacs %s)\n", "b2m", VERSION);
puts ("b2m is in the public domain.");
- exit (GOOD);
+ exit (EXIT_SUCCESS);
case 'h':
fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname);
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
}
if (optind != argc)
{
fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname);
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
labels_saved = printing = header = FALSE;
@@ -191,7 +182,7 @@ main (argc, argv)
puts (data.buffer);
}
- return 0;
+ return EXIT_SUCCESS;
}
@@ -298,8 +289,10 @@ fatal (message)
char *message;
{
fprintf (stderr, "%s: %s\n", progname, message);
- exit (BAD);
+ exit (EXIT_FAILURE);
}
/* arch-tag: 5a3ad2af-a802-408f-83cc-e7cf5e98653e
(do not change this comment) */
+
+/* b2m.c ends here */
diff --git a/lib-src/etags.c b/lib-src/etags.c
index e9fab1be3ee..829fc97fbfd 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -177,15 +177,6 @@ If you want regular expression support, you should delete this notice and
# 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 @@ print_version ()
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 @@ print_help (argbuffer)
}
if (help_for_lang)
- exit (GOOD);
+ exit (EXIT_SUCCESS);
printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\
\n\
@@ -990,7 +981,7 @@ Relative ones are stored relative to the output file's directory.\n");
puts ("");
puts ("Report bugs to bug-gnu-emacs@gnu.org");
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
@@ -1413,7 +1404,7 @@ main (argc, argv)
if (fclose (tagf) == EOF)
pfatal (tagfile);
- exit (GOOD);
+ exit (EXIT_SUCCESS);
}
if (update)
@@ -1432,7 +1423,7 @@ main (argc, argv)
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 @@ main (argc, argv)
sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
exit (system (cmd));
}
- return GOOD;
+ return EXIT_SUCCESS;
}
@@ -6470,7 +6461,7 @@ fatal (s1, s2)
char *s1, *s2;
{
error (s1, s2);
- exit (BAD);
+ exit (EXIT_FAILURE);
}
static void
@@ -6478,7 +6469,7 @@ pfatal (s1)
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",
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 @@ xrealloc (ptr, size)
/* arch-tag: 8a9b748d-390c-4922-99db-2eeefa921051
(do not change this comment) */
+
+/* etags.c ends here */