]> git.eshelyaron.com Git - emacs.git/commitdiff
(GOOD, BAD): Delete macros. Throughout,
authorThien-Thi Nguyen <ttn@gnuvola.org>
Sat, 8 May 2004 16:35:54 +0000 (16:35 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Sat, 8 May 2004 16:35:54 +0000 (16:35 +0000)
replace w/ `EXIT_SUCCESS' and `EXIT_FAILURE', respectively.
(main): Use `EXIT_SUCCESS' or `EXIT_FAILURE' for return value.

lib-src/ChangeLog
lib-src/b2m.c
lib-src/etags.c

index b378fdb1eec4e56d334623a6ba5b75d8c07b4d98..0c97e1331d48f9a0a7e5371bad0952d13b77872d 100644 (file)
@@ -1,3 +1,11 @@
+2004-05-08  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-07  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * b2m.c: Properly spell the name of Emacs.
index 05caa1424e0046eb362f1f121d9b0b85c7c4ef10..f1394fdda74d57ff05e0d2025010ec6a684f8019 100644 (file)
 #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,6 +289,7 @@ fatal (message)
      char *message;
 {
   fprintf (stderr, "%s: %s\n", progname, message);
-  exit (BAD);
+  exit (EXIT_FAILURE);
 }
 
+/* b2m.c ends here */
index 2b044dffed25dde7c7517a59af786d4d67c4e0ed..e71c95ffb90a0e4299b94e53373c442d5c1a7fda 100644 (file)
@@ -161,15 +161,6 @@ char pot_etags_version[] = "@(#) pot revision number is 14.21";
 # 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 strneq(s,t,n)  (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n))
 
@@ -627,7 +618,7 @@ print_version ()
   puts ("Copyright (C) 1999 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
@@ -764,7 +755,7 @@ Relative ones are stored relative to the output file's directory.");
   puts ("");
   puts ("Report bugs to bug-gnu-emacs@gnu.org");
 
-  exit (GOOD);
+  exit (EXIT_SUCCESS);
 }
 
 \f
@@ -1180,7 +1171,7 @@ main (argc, argv)
        fprintf (tagf, "\f\n%s,include\n", *included_files++);
 
       fclose (tagf);
-      exit (GOOD);
+      exit (EXIT_SUCCESS);
     }
 
   /* If CTAGS, we are here.  process_file did not write the tags yet,
@@ -1190,7 +1181,7 @@ main (argc, argv)
       put_entries (head);
       free_tree (head);
       head = NULL;
-      exit (GOOD);
+      exit (EXIT_SUCCESS);
     }
 
   if (update)
@@ -1203,7 +1194,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;
@@ -1223,7 +1214,7 @@ main (argc, argv)
       sprintf (cmd, "sort -o %.*s %.*s", BUFSIZ, tagfile, BUFSIZ, tagfile);
       exit (system (cmd));
     }
-  return GOOD;
+  return EXIT_SUCCESS;
 }
 
 
@@ -5526,7 +5517,7 @@ fatal (s1, s2)
      char *s1, *s2;
 {
   error (s1, s2);
-  exit (BAD);
+  exit (EXIT_FAILURE);
 }
 
 static void
@@ -5534,7 +5525,7 @@ pfatal (s1)
      char *s1;
 {
   perror (s1);
-  exit (BAD);
+  exit (EXIT_FAILURE);
 }
 
 static void
@@ -5548,7 +5539,7 @@ suggest_asking_for_help ()
           "-h"
 #endif
           );
-  exit (BAD);
+  exit (EXIT_FAILURE);
 }
 
 /* Print error message.  `s1' is printf control string, `s2' is arg for it. */
@@ -5819,3 +5810,5 @@ xrealloc (ptr, size)
     fatal ("virtual memory exhausted", (char *)NULL);
   return result;
 }
+
+/* etags.c ends here */