]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Change `exit (0)' to `exit (EXIT_SUCCESS)',
authorJim Meyering <jim@meyering.net>
Sat, 31 Aug 2002 08:52:10 +0000 (08:52 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 31 Aug 2002 08:52:10 +0000 (08:52 +0000)
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.

69 files changed:
src/basename.c
src/chgrp.c
src/chmod.c
src/chown.c
src/chroot.c
src/cksum.c
src/comm.c
src/cp.c
src/csplit.c
src/date.c
src/dd.c
src/df.c
src/dircolors.c
src/dirname.c
src/du.c
src/echo.c
src/env.c
src/expand.c
src/expr.c
src/factor.c
src/fmt.c
src/fold.c
src/head.c
src/hostid.c
src/hostname.c
src/id.c
src/install.c
src/join.c
src/link.c
src/ln.c
src/logname.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mv.c
src/nice.c
src/nl.c
src/od.c
src/paste.c
src/pathchk.c
src/pinky.c
src/printenv.c
src/printf.c
src/pwd.c
src/rm.c
src/rmdir.c
src/seq.c
src/shred.c
src/sleep.c
src/stty.c
src/su.c
src/sum.c
src/sync.c
src/tac.c
src/tail.c
src/tee.c
src/touch.c
src/tsort.c
src/tty.c
src/uname.c
src/unexpand.c
src/uniq.c
src/unlink.c
src/uptime.c
src/users.c
src/wc.c
src/who.c
src/whoami.c
src/yes.c

index 139b9e90c39d02550fcbc9edded5522b2b8835b4..aa0e14161a48511b20715b0ebfeb2425f9f596b5 100644 (file)
@@ -1,5 +1,5 @@
 /* basename -- strip directory and suffix from filenames
-   Copyright (C) 1990-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -113,7 +113,7 @@ main (int argc, char **argv)
     {
       error (0, 0, (argc == 1 ? _("too few arguments")
                    : _("too many arguments")));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   name = base_name (argv[1]);
@@ -124,5 +124,5 @@ main (int argc, char **argv)
 
   puts (name);
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 4914330901feb3578c61c08e4b4eb53f8b1944bb..5727b27207a6817cd6c1be412d3cd7b175de5051 100644 (file)
@@ -1,5 +1,5 @@
 /* chgrp -- change group ownership of files
-   Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 89, 90, 91, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -201,14 +201,14 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (argc - optind + (reference_file ? 1 : 0) <= 1)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (reference_file)
index 8abbd618bb577b01a07df72cb4d3fb2d4838ffea..cc0e0f2e469a65969d6cc235071527e0e2fe9f92 100644 (file)
@@ -341,7 +341,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -351,7 +351,7 @@ main (int argc, char **argv)
   if (optind >= argc)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   changes = (reference_file ? mode_create_from_ref (reference_file)
index 5320f7ade83512157369f4b8044825e57fe02f04..0a5609620620938254e90e989518b7303e806c54 100644 (file)
@@ -1,5 +1,5 @@
 /* chown -- change user and group ownership of files
-   Copyright (C) 89, 90, 91, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 89, 90, 91, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -202,14 +202,14 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (argc - optind + (reference_file ? 1 : 0) <= 1)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (reference_file)
index f63ab2a5394f11316c90d3d247902b99eff1d067..cbec705c2d0b5b294637c946f3eaef96f9f53f0c 100644 (file)
@@ -76,7 +76,7 @@ main (int argc, char **argv)
   if (argc == 1)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (chroot (argv[1]))
index 7d0fdc75da048b73fa1e79982e6eb190bd3e50fd..c7de79edfcf9004f2e2dd795a0f0361083644844 100644 (file)
@@ -319,7 +319,7 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index 7da3de20bd8cecb2c438bda2d5e7441c767ef41e..00b14357cc7a3460ef387ad5e6e1d358354431b1 100644 (file)
@@ -257,11 +257,11 @@ main (int argc, char **argv)
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
       default:
-       usage (1);
+       usage (EXIT_FAILURE);
       }
 
   if (optind + 2 != argc)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   exit (compare_files (argv + optind) == 0
        ? EXIT_SUCCESS : EXIT_FAILURE);
index 36a66e059bb2bdd86c3b0402f1352083442ca76a..76e124aab6f6cc1eb8b591d80baaf6fd12855cc2 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -491,12 +491,12 @@ do_copy (int n_files, char **file, const char *target_directory,
   if (n_files <= 0)
     {
       error (0, 0, _("missing file arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
   if (n_files == 1 && !target_directory)
     {
       error (0, 0, _("missing destination file"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (target_directory)
@@ -545,7 +545,7 @@ do_copy (int n_files, char **file, const char *target_directory,
        {
          error (0, 0, _("%s: specified target is not a directory"),
                 quote (dest));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
 
       if (n_files > 1)
@@ -553,7 +553,7 @@ do_copy (int n_files, char **file, const char *target_directory,
          error (0, 0,
         _("copying multiple files, but last argument %s is not a directory"),
             quote (dest));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -650,7 +650,7 @@ do_copy (int n_files, char **file, const char *target_directory,
        {
          error (0, 0,
               _("when preserving paths, the destination must be a directory"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
 
       source = file[0];
@@ -999,14 +999,14 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (x.hard_link && x.symbolic_link)
     {
       error (0, 0, _("cannot make both hard and symbolic links"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (backup_suffix_string)
index ebc930686e24845cee28f12cb80123a0339dce72..f8c179368eabdb2502d5ecbb29d43191df4f6d1a 100644 (file)
@@ -1454,13 +1454,13 @@ main (int argc, char **argv)
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
       default:
-       usage (1);
+       usage (EXIT_FAILURE);
       }
 
   if (argc - optind < 2)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (suffix)
index bc0c81a5a2ec8b7cb6fb6ddf8c0bb37b3dca2260..bf1332b7a57fe0b09e439aee754db3d96f8e3c55 100644 (file)
@@ -351,7 +351,7 @@ main (int argc, char **argv)
       case_GETOPT_HELP_CHAR;
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
       default:
-       usage (1);
+       usage (EXIT_FAILURE);
       }
 
   n_args = argc - optind;
@@ -364,21 +364,21 @@ main (int argc, char **argv)
     {
       error (0, 0,
        _("the options to specify dates for printing are mutually exclusive"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (set_date && option_specified_date)
     {
       error (0, 0,
          _("the options to print and set the time may not be used together"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (n_args > 1)
     {
       error (0, 0, _("too many non-option arguments: %s%s"),
             argv[optind + 1], n_args == 2 ? "" : " ...");
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if ((set_date || option_specified_date)
@@ -389,7 +389,7 @@ the argument `%s' lacks a leading `+';\n\
 When using an option to specify date(s), any non-option\n\
 argument must be a format string beginning with `+'."),
             argv[optind]);
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   /* Simply ignore --rfc-822 if specified when setting the date.  */
@@ -398,7 +398,7 @@ argument must be a format string beginning with `+'."),
       error (0, 0,
             _("a format string may not be specified when using\
  the --rfc-822 (-R) option"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (set_date)
index da3c87d55862d242d5386bd7a3523e8db7ca6417..d082c34422a1c180dfb62ca71daeaf7ec90b4637 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -504,7 +504,7 @@ parse_conversion (char *str)
       if (conversions[i].convname == NULL)
        {
          error (0, 0, _("invalid conversion: %s"), quote (str));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
       str = new;
   } while (new != NULL);
@@ -560,7 +560,7 @@ scanargs (int argc, char **argv)
       if (val == NULL)
        {
          error (0, 0, _("unrecognized option %s"), quote (name));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
       *val++ = '\0';
 
@@ -608,7 +608,7 @@ scanargs (int argc, char **argv)
            {
              error (0, 0, _("unrecognized option %s=%s"),
                     quote_n (0, name), quote_n (1, val));
-             usage (1);
+             usage (EXIT_FAILURE);
            }
 
          if (invalid)
index 05364c82def7edf22d5803155ea69a9c68027d0d..f72c53873ec27b070b36ce62c547639db57ffb37 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -488,7 +488,7 @@ done:
   {
     int save_errno = errno;
     if (restore_cwd (&cwd, 0, mp))
-      exit (1);                        /* We're scrod.  */
+      exit (EXIT_FAILURE);                     /* We're scrod.  */
     free_cwd (&cwd);
     errno = save_errno;
   }
@@ -878,7 +878,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -902,7 +902,7 @@ main (int argc, char **argv)
          }
       }
     if (match)
-      exit (1);
+      exit (EXIT_FAILURE);
   }
 
   {
index f9b6c14883cfab2829d54d5239d29c737cd12ba4..bf2b2c2a018314f329d07e1151d07f5bf922df55 100644 (file)
@@ -1,5 +1,5 @@
 /* dircolors - output commands to set the LS_COLOR environment variable
-   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001 H. Peter Anvin
+   Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 H. Peter Anvin
    Copyright (C) 1996-2000 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -454,7 +454,7 @@ main (int argc, char **argv)
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
       default:
-       usage (1);
+       usage (EXIT_FAILURE);
       }
 
   argc -= optind;
@@ -467,7 +467,7 @@ main (int argc, char **argv)
       error (0, 0,
             _("the options to output dircolors' internal database and\n\
 to select a shell syntax are mutually exclusive"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (print_database && argc > 0)
@@ -475,13 +475,13 @@ to select a shell syntax are mutually exclusive"));
       error (0, 0,
             _("no FILE arguments may be used with the option to output\n\
 dircolors' internal database"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (!print_database && argc > 1)
     {
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (print_database)
index 6dfb0b34040888d0b697098ee711899e994d9ca8..e88e6a21c699d5ca62c8052cb9cc555f29a2a738 100644 (file)
@@ -88,7 +88,7 @@ main (int argc, char **argv)
     {
       error (0, 0, argc < 2 ? _("too few arguments")
             : _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   result = argv[1];
@@ -103,5 +103,5 @@ main (int argc, char **argv)
   fwrite (result, 1, len, stdout);
   putchar ('\n');
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 7e29a96d3019d07ab71313c3dbe3075f57d1d407..68121baee056d92808adeb95e29fca3e2ed0aa91 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -380,7 +380,7 @@ pop_dir (struct saved_cwd *cwd, const char *curr_dir_name)
   if (cwd)
     {
       if (restore_cwd (cwd, "..", curr_dir_name))
-       exit (1);
+       exit (EXIT_FAILURE);
       free_cwd (cwd);
     }
   else if (chdir ("..") < 0)
@@ -456,7 +456,7 @@ count_entry (const char *ent, int top, dev_t last_dev, int depth)
              && S_ISLNK (e_buf.st_mode)))
        {
          if (save_cwd (&cwd_buf))
-           exit (1);
+           exit (EXIT_FAILURE);
          cwd = &cwd_buf;
        }
       else
@@ -671,14 +671,14 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (opt_all && opt_summarize_only)
     {
       error (0, 0, _("cannot both summarize and show all entries"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (opt_summarize_only && max_depth_specified && max_depth == 0)
@@ -692,7 +692,7 @@ main (int argc, char **argv)
       error (0, 0,
             _("warning: summarizing conflicts with --max-depth=%d"),
               max_depth);
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (opt_summarize_only)
index 929f10106e4977d317961c8024873f2a81d07b54..3538ed503026326fd6b476cade7d2873a5289837 100644 (file)
@@ -1,5 +1,5 @@
 /* echo.c, derived from code echo.c in Bash.
-   Copyright (C) 87,89, 1991-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 87,89, 1991-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -244,5 +244,5 @@ just_echo:
     }
   if (display_return)
     putchar ('\n');
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 59bd03839d216dc2eb2a00673aa4332f19a7c8c9..163c4fbeedfaf0a55271233ee3f29e3dff091408 100644 (file)
--- a/src/env.c
+++ b/src/env.c
@@ -1,5 +1,5 @@
 /* env - run a program in a modified environment
-   Copyright (C) 1986, 1991-2001 Free Software Foundation, Inc.
+   Copyright (C) 1986, 1991-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -194,7 +194,7 @@ main (register int argc, register char **argv, char **envp)
     {
       while (*environ)
        puts (*environ++);
-      exit (0);
+      exit (EXIT_SUCCESS);
     }
 
   execvp (argv[optind], &argv[optind]);
index 1ce8ac72c3a851ef4356b0feb765a307f7d22e1b..84d14d9246355844f64d768bc4fda6579d4ac905 100644 (file)
@@ -358,7 +358,7 @@ main (int argc, char **argv)
          break;
 
        case '?':
-         usage (1);
+         usage (EXIT_FAILURE);
        case 'i':
          convert_entire_line = 0;
          break;
index 18000705d2ee38afaafa64c247482b017247ec75..6b705d467209e3f74aefde32f61c6a904604a363 100644 (file)
@@ -175,7 +175,7 @@ main (int argc, char **argv)
   if (argc == 1)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   args = argv + 1;
index 491f406f26a5009c0913afe44315ec3b288055ee..c78cebbde3fcd16c1b4877813dde62234ab84ecb 100644 (file)
@@ -1,5 +1,5 @@
 /* factor -- print prime factors of n.
-   Copyright (C) 86, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 86, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -217,7 +217,7 @@ main (int argc, char **argv)
        fail |= print_factors (argv[i]);
     }
   if (fail)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   exit (fail);
 }
index f86513f33cbd34a99b5848fcd217b319c451b9f8..fbc2c578df5099730c6bb369514927d3af4a91c1 100644 (file)
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -1,5 +1,5 @@
 /* GNU fmt -- simple text formatter.
-   Copyright (C) 1994-2001 Free Software Foundation, Inc.
+   Copyright (C) 1994-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -356,7 +356,7 @@ main (register int argc, register char **argv)
     switch (optchar)
       {
       default:
-       usage (1);
+       usage (EXIT_FAILURE);
 
       case 0:
        break;
index be1d669da37bb0aa562d62d91151998be2a8cc95..cf88673694d07632abadf707afdc0d201d3fd778 100644 (file)
@@ -302,7 +302,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index f0879a1d10f3f0bfd351c4165bf3743b6e1b0f6b..540d601c43d68b4ea470f3736fcd208d5fd7173f 100644 (file)
@@ -338,7 +338,7 @@ main (int argc, char **argv)
 
            default:
              error (0, 0, _("unrecognized option `-%c'"), *a);
-             usage (1);
+             usage (EXIT_FAILURE);
            }
        }
 
@@ -399,7 +399,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index 21bbde7c6281b899091d626c4a64957869fedbf0..d27207baff7f65a750ecaf8bceee2e0d9cabbc2e 100644 (file)
@@ -1,5 +1,5 @@
 /* print the hexadecimal identifier for the current host
-   Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -77,7 +77,7 @@ main (int argc, char **argv)
   if (argc > 1)
     {
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   id = gethostid ();
index c004523caa8e41bdf1672d99cdcdbff0289db9ef..3f13b072e2981807c978eb4e11f61a49978fab64 100644 (file)
@@ -1,5 +1,5 @@
 /* hostname - set or print the name of current host system
-   Copyright (C) 1994-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1994-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -102,7 +102,7 @@ main (int argc, char **argv)
       err = sethostname (argv[1], strlen (argv[1]));
       if (err != 0)
        error (EXIT_FAILURE, errno, _("cannot set hostname to `%s'"), argv[1]);
-      exit (0);
+      exit (EXIT_SUCCESS);
     }
 #else
   if (argc == 2)
@@ -120,8 +120,8 @@ main (int argc, char **argv)
   else
     {
       error (2, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 9f2bd460ad00fa34d25389a825850fb0c2fd7e9b..4044b03833462892daa1ad78a46bec07c1c8a2bb 100644 (file)
--- a/src/id.c
+++ b/src/id.c
@@ -154,7 +154,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -166,7 +166,7 @@ main (int argc, char **argv)
           _("cannot print only names or real IDs in default format"));
 
   if (argc - optind > 1)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   if (argc - optind == 1)
     {
index 1afcdcaca829e6bae71bf59241ffbea1ac10130f..3be52b095afcf044cd6801dcd880133bb522e4f7 100644 (file)
@@ -263,7 +263,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -286,7 +286,7 @@ main (int argc, char **argv)
   if (n_files == 0 || (n_files == 1 && !dir_arg))
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (specified_mode)
@@ -336,7 +336,7 @@ main (int argc, char **argv)
                     _("installing multiple files, but last argument, %s \
 is not a directory"),
                     quote (dest));
-             usage (1);
+             usage (EXIT_FAILURE);
            }
 
          dest_info_init (&x);
index b6f2c692267869fc590f84638fd606a4765b740e..368ea22b8fe53a0b178ed32393a34845af9eee57 100644 (file)
@@ -830,7 +830,7 @@ main (int argc, char **argv)
          if (nfiles > 1)
            {
              error (0, 0, _("too many non-option arguments"));
-             usage (1);
+             usage (EXIT_FAILURE);
            }
          names[nfiles++] = optarg;
          break;
@@ -840,7 +840,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
       prev_optc = optc;
     }
@@ -852,7 +852,7 @@ main (int argc, char **argv)
   if (nfiles != 2)
     {
       error (0, 0, _("too few non-option arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   fp1 = STREQ (names[0], "-") ? stdin : fopen (names[0], "r");
index d5c655ba3b595472410cf7ab9d2f0d83f634f4b7..760ad945bb4bc49138797a4245b7d075af2b09a1 100644 (file)
@@ -1,5 +1,5 @@
 /* link utility for GNU.
-   Copyright (C) 20012002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -85,18 +85,18 @@ main (int argc, char **argv)
   if (argc < 3)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (3 < argc)
     {
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (link (argv[1], argv[2]) != 0)
     error (EXIT_FAILURE, errno, _("cannot create link %s to %s"),
           quote_n (0, argv[2]), quote_n (1, argv[1]));
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 06589f58c8e510ee6b94f23f206cfbf58f4ee5fb..a674ad25a766d5b08f1c001179cfd409b1114bc4 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -477,7 +477,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
          break;
        }
     }
@@ -488,7 +488,7 @@ main (int argc, char **argv)
   if (n_files == 0)
     {
       error (0, 0, _("missing file argument"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   target_directory_specified = (target_directory != NULL);
@@ -520,7 +520,7 @@ main (int argc, char **argv)
     {
       error (0, 0, _("%s: specified target directory is not a directory"),
             quote (target_directory));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (backup_suffix_string)
index b3fe3eb170412af688b6f02e7e3a737c0881abee..d86fab0e8944c4335499bb6ad7781dc69bc99911 100644 (file)
@@ -1,5 +1,5 @@
 /* logname -- print user's login name
-   Copyright (C) 1990-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -81,21 +81,21 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (argc - optind != 0)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   /* POSIX requires using getlogin (or equivalent code).  */
   cp = getlogin ();
   if (cp)
     {
       puts (cp);
-      exit (0);
+      exit (EXIT_SUCCESS);
     }
   /* POSIX prohibits using a fallback technique.  */
   fprintf (stderr, _("%s: no login name\n"), argv[0]);
-  exit (1);
+  exit (EXIT_FAILURE);
 }
index 877fd9812163011dd5905c40a4fac564078869c0..5df9c18495c9ca33667127de0d8474d4ff3d1526 100644 (file)
@@ -1,5 +1,5 @@
 /* mkdir -- make directories
-   Copyright (C) 90, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 90, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -115,14 +115,14 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind == argc)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   newmode = S_IRWXUGO;
index ae2ee326f79d6dc0232bee8c7c4db2cf4c49ee2e..2fa279e8e74a90345e09757be8940529a2504bc6 100644 (file)
@@ -1,5 +1,5 @@
 /* mkfifo -- make fifo's (named pipes)
-   Copyright (C) 90, 91, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 90, 91, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -104,14 +104,14 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind == argc)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   newmode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
index 66ccba06a166b170abc8382b0b7853908649a063..21498568f6bd971cbeed3b30e31c63b4c0e2e0ed 100644 (file)
@@ -118,7 +118,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -144,7 +144,7 @@ main (int argc, char **argv)
       else
        msg = _("wrong number of arguments");
       error (0, 0, "%s", msg);
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   /* Only check the first character, to allow mnemonic usage like
@@ -175,7 +175,7 @@ main (int argc, char **argv)
          error (0, 0, _("\
 when creating special files, major and minor device\n\
 numbers must be specified"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
 
       {
@@ -213,7 +213,7 @@ numbers must be specified"));
        {
          error (0, 0, _("\
 major and minor device numbers may not be specified for fifo files"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
       if (mkfifo (argv[optind], newmode))
        error (EXIT_FAILURE, errno, "%s", quote (argv[optind]));
@@ -222,7 +222,7 @@ major and minor device numbers may not be specified for fifo files"));
 
     default:
       error (0, 0, "invalid device type %s", quote (argv[optind + 1]));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   /* Perform an explicit chmod to ensure the file mode permission bits
@@ -236,5 +236,5 @@ major and minor device numbers may not be specified for fifo files"));
                quote (argv[optind]));
     }
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index cdf3d9a335fa6684398e44b4d43492203fdf2b6e..77fb9ff9e7d234ec63657000d1ade710f1f96f34 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
@@ -444,7 +444,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -460,7 +460,7 @@ main (int argc, char **argv)
   if (n_files == 0 || (n_files == 1 && !target_directory_specified))
     {
       error (0, 0, _("missing file argument"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (target_directory_specified)
@@ -469,14 +469,14 @@ main (int argc, char **argv)
        {
          error (0, 0, _("specified target, %s is not a directory"),
                 quote (target_directory));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
   else if (n_files > 2 && !dest_is_dir)
     {
       error (0, 0,
            _("when moving multiple files, last argument must be a directory"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (backup_suffix_string)
index 13122d92f108820b23305200964f1a6de5ff5687..f8b5b85f28827225ab8d7e9656e199531040534d 100644 (file)
@@ -139,7 +139,7 @@ main (int argc, char **argv)
              switch (optc)
                {
                case '?':
-                 usage (1);
+                 usage (EXIT_FAILURE);
 
                case 'n':
                  if (xstrtol (optarg, NULL, 10, &adjustment, "")
@@ -169,7 +169,7 @@ main (int argc, char **argv)
       if (adjustment_given)
        {
          error (0, 0, _("a command must be given with an adjustment"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
       /* No command given; print the priority. */
       errno = 0;
@@ -177,7 +177,7 @@ main (int argc, char **argv)
       if (current_priority == -1 && errno != 0)
        error (EXIT_FAILURE, errno, _("cannot get priority"));
       printf ("%d\n", current_priority);
-      exit (0);
+      exit (EXIT_SUCCESS);
     }
 
 #ifndef NICE_PRIORITY
index 5204380fcfbd9fcc3ed23c193cdded8ad3d9a5ae..065aa4e52fb1d66f816ebd8f397cf3de8782559f 100644 (file)
--- a/src/nl.c
+++ b/src/nl.c
@@ -1,5 +1,5 @@
 /* nl -- number lines of files
-   Copyright (C) 89, 92, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 89, 92, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index 6c0de1874e0b4f765a6c66382b81c1fb96cd6cf1..a3836bb0f3612f5e21d5e5a30f8ab27df40af255 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -1812,7 +1812,7 @@ it must be one character from [doxn]"),
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
          break;
        }
     }
@@ -1872,7 +1872,7 @@ it must be one character from [doxn]"),
              error (0, 0,
                     _("invalid second operand in compatibility mode `%s'"),
                     argv[optind + 1]);
-             usage (1);
+             usage (EXIT_FAILURE);
            }
        }
       else if (n_files == 3)
@@ -1892,14 +1892,14 @@ it must be one character from [doxn]"),
            {
              error (0, 0,
            _("in compatibility mode, the last two arguments must be offsets"));
-             usage (1);
+             usage (EXIT_FAILURE);
            }
        }
       else if (n_files > 3)
        {
          error (0, 0,
                 _("compatibility mode supports at most three arguments"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
 
       if (flag_pseudo_start)
index 3814c5a088b38998a5073869b9425eb472de9683..839fef15fd1389242e8fcccc28e7205a4e933b4c 100644 (file)
@@ -1,5 +1,5 @@
 /* paste - merge lines of files
-   Copyright (C) 1984, 1997, 1998, 1999, 2000, 2001 by David M. Ihnat
+   Copyright (C) 1984, 1997-2002 by David M. Ihnat
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -467,7 +467,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index fa81b1b6875d258f2dfaf5ec14fbaf0ddc37603b..3fcc129241876081eeea419979497ec99c0ea07b 100644 (file)
@@ -179,14 +179,14 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind == argc)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   for (; optind < argc; ++optind)
index d25317ece5dd46b8b9b7319f7a4e6a7964b1db84..59400d7850e9695918e821d7af0767cb4349a083 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU's pinky.
-   Copyright (C) 1992-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1992-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -563,7 +563,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -573,7 +573,7 @@ main (int argc, char **argv)
     {
       error (0, 0, _("no username specified; at least one must be\
  specified when using -l"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (do_short_format)
@@ -581,5 +581,5 @@ main (int argc, char **argv)
   else
     long_pinky (n_users, argv + optind);
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 68608e113428b2ebc9ec7592497efc1a560f8db9..89472ff8dce3e437ae727ff6f31f1d6e4265afd4 100644 (file)
@@ -1,5 +1,5 @@
 /* printenv -- print all or part of environment
-   Copyright (C) 1989-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1989-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -103,7 +103,7 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index 38e02c914d79a837f6fda60892eb45a3e17bd017..b7eceffa4926543aaca507f99c086cd528eeea1e 100644 (file)
@@ -1,5 +1,5 @@
 /* printf - format and print data
-   Copyright (C) 1990-2001, Free Software Foundation, Inc.
+   Copyright (C) 1990-2002, Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -206,7 +206,7 @@ print_esc_char (int c)
       putchar (8);
       break;
     case 'c':                  /* Cancel the rest of the output. */
-      exit (0);
+      exit (EXIT_SUCCESS);
       break;
     case 'f':                  /* Form feed. */
       putchar (12);
@@ -548,7 +548,7 @@ main (int argc, char **argv)
   if (argc == 1)
     {
       fprintf (stderr, _("Usage: %s format [argument...]\n"), program_name);
-      exit (1);
+      exit (EXIT_FAILURE);
     }
 
   format = argv[1];
index 6a4ce2ae032341e5aeab4a0486bbecd905cec812..9e53b6143c3d930e10913e1b575874477be88cfb 100644 (file)
--- a/src/pwd.c
+++ b/src/pwd.c
@@ -1,5 +1,5 @@
 /* pwd - print current directory
-   Copyright (C) 1994-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1994-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -79,5 +79,5 @@ main (int argc, char **argv)
     error (EXIT_FAILURE, errno, _("cannot get current directory"));
   printf ("%s\n", wd);
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 7c56280daef3a86d87325e08af72ea974b6e92af..5df4ed861ae86798bbfe5c7c1aba1b06b7c1cf49 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -187,18 +187,18 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind == argc)
     {
       if (x.ignore_missing_files)
-       exit (0);
+       exit (EXIT_SUCCESS);
       else
        {
          error (0, 0, _("too few arguments"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index bacc911f0312ec95c3d7ce5b24e37ff07b48557f..4c401350d793c8aaa509a5f4df0ad01da50d11c5 100644 (file)
@@ -1,5 +1,5 @@
 /* rmdir -- remove directories
-   Copyright (C) 90, 91, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 90, 91, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -195,14 +195,14 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind == argc)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   for (; optind < argc; ++optind)
index 6acb6115d78bfbddb7c48257f68297111254a808..58bb59b4a0f6eb31af9420daea541ad1a15c298e 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -117,7 +117,7 @@ scan_double_arg (const char *arg)
   if (xstrtod (arg, NULL, &ret_val))
     {
       error (0, 0, _("invalid floating point argument: %s"), arg);
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   return ret_val;
@@ -188,7 +188,7 @@ print_numbers (const char *fmt)
          error (0, 0,
                 _("when the starting value is larger than the limit,\n\
 the increment must be negative"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
 
       printf (fmt, first);
@@ -212,7 +212,7 @@ the increment must be negative"));
          error (0, 0,
                 _("when the starting value is smaller than the limit,\n\
 the increment must be positive"));
-         usage (1);
+         usage (EXIT_FAILURE);
        }
 
       printf (fmt, first);
@@ -402,26 +402,26 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (argc - optind < 1)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (3 < argc - optind)
     {
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (format_str && !valid_format (format_str))
     {
       error (0, 0, _("invalid format string: `%s'"), format_str);
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   last = scan_double_arg (argv[optind++]);
@@ -444,7 +444,7 @@ main (int argc, char **argv)
     {
       error (0, 0, _("\
 format string may not be specified when printing equal width strings"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (!step_is_set)
index da2b78834afaa76ae86d7f4beca24a06e2d8cc00..ced54830808894021665a6e77b45f003787007bf 100644 (file)
@@ -1597,7 +1597,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -1607,7 +1607,7 @@ main (int argc, char **argv)
   if (n_files == 0)
     {
       error (0, 0, _("missing file argument"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   for (i = 0; i < n_files; i++)
index 62b1f16f8e001e55f7874db9e9ba01c9814c6d6d..2c590c9c77f3b582d39b3f3e00742377b82c6349 100644 (file)
@@ -212,14 +212,14 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (argc == 1)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
 #ifdef FE_UPWARD
@@ -248,7 +248,7 @@ main (int argc, char **argv)
     }
 
   if (fail)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   /* Separate whole seconds from nanoseconds.
      Be careful to detect any overflow.  */
@@ -298,5 +298,5 @@ main (int argc, char **argv)
                               clock_get_realtime (&ts_start)))
     continue;
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index ed9ec5566d340ad1197de96a2fdd5b8385d5b254..de4e261932c6baadafe06a216e1f09dce71705d1 100644 (file)
@@ -802,7 +802,7 @@ main (int argc, char **argv)
 
   /* FIXME: what is this?!? */
   if (invalid_long_option)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   /* Clear out the options that have been parsed.  This is really
      gross, but it's needed because stty SETTINGS look like options to
@@ -923,7 +923,7 @@ mutually exclusive"));
       max_col = screen_columns ();
       current_col = 0;
       display_settings (output_type, &mode, fd, device_name);
-      exit (0);
+      exit (EXIT_SUCCESS);
     }
 
   speed_was_set = 0;
@@ -958,7 +958,7 @@ mutually exclusive"));
       if (match_found == 0 && reversed)
        {
          error (0, 0, _("invalid argument `%s'"), --argv[k]);
-         usage (1);
+         usage (EXIT_FAILURE);
        }
       if (match_found == 0)
        {
@@ -969,7 +969,7 @@ mutually exclusive"));
                  if (k == argc - 1)
                    {
                      error (0, 0, _("missing argument to `%s'"), argv[k]);
-                     usage (1);
+                     usage (EXIT_FAILURE);
                    }
                  match_found = 1;
                  ++k;
@@ -986,7 +986,7 @@ mutually exclusive"));
              if (k == argc - 1)
                {
                  error (0, 0, _("missing argument to `%s'"), argv[k]);
-                 usage (1);
+                 usage (EXIT_FAILURE);
                }
              ++k;
              set_speed (input_speed, argv[k], &mode);
@@ -998,7 +998,7 @@ mutually exclusive"));
              if (k == argc - 1)
                {
                  error (0, 0, _("missing argument to `%s'"), argv[k]);
-                 usage (1);
+                 usage (EXIT_FAILURE);
                }
              ++k;
              set_speed (output_speed, argv[k], &mode);
@@ -1011,7 +1011,7 @@ mutually exclusive"));
              if (k == argc - 1)
                {
                  error (0, 0, _("missing argument to `%s'"), argv[k]);
-                 usage (1);
+                 usage (EXIT_FAILURE);
                }
              ++k;
              set_window_size ((int) integer_arg (argv[k]), -1,
@@ -1023,7 +1023,7 @@ mutually exclusive"));
              if (k == argc - 1)
                {
                  error (0, 0, _("missing argument to `%s'"), argv[k]);
-                 usage (1);
+                 usage (EXIT_FAILURE);
                }
              ++k;
              set_window_size (-1, (int) integer_arg (argv[k]),
@@ -1042,7 +1042,7 @@ mutually exclusive"));
              if (k == argc - 1)
                {
                  error (0, 0, _("missing argument to `%s'"), argv[k]);
-                 usage (1);
+                 usage (EXIT_FAILURE);
                }
              ++k;
              mode.c_line = integer_arg (argv[k]);
@@ -1065,7 +1065,7 @@ mutually exclusive"));
              if (recover_mode (argv[k], &mode) == 0)
                {
                  error (0, 0, _("invalid argument `%s'"), argv[k]);
-                 usage (1);
+                 usage (EXIT_FAILURE);
                }
              require_set_attr = 1;
            }
@@ -1133,7 +1133,7 @@ mutually exclusive"));
        }
     }
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
 
 /* Return 0 if not applied because not reversible; otherwise return 1.  */
@@ -1912,7 +1912,7 @@ integer_arg (const char *s)
   if (xstrtol (s, NULL, 0, &value, "bB") != LONGINT_OK)
     {
       error (0, 0, _("invalid integer argument `%s'"), s);
-      usage (1);
+      usage (EXIT_FAILURE);
     }
   return value;
 }
index 5b1328ccf0e8768f6c6ff0290ccc7431f5f1e9b3..ae67bf9f38ea55b51ae2c0248160dfba6696f1e6 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -1,5 +1,5 @@
 /* su for GNU.  Run a shell with substitute user and group IDs.
-   Copyright (C) 1992-2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1992-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -510,7 +510,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index 302ade014ff5fff74b49139c0be5eb8da789f813..3ce48f439236cb01e5172da7c0430205b590c21a 100644 (file)
--- a/src/sum.c
+++ b/src/sum.c
@@ -1,5 +1,5 @@
 /* sum -- checksum and count the blocks in a file
-   Copyright (C) 86, 89, 91, 1995-2001 Free Software Foundation, Inc.
+   Copyright (C) 86, 89, 91, 1995-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -249,7 +249,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index 2e101576443ad7de5c42d2a9cd9697e4999f2cb9..2b8c50ee8ceeb0555dde89f78e7c84020a592349 100644 (file)
@@ -1,5 +1,5 @@
 /* sync - update the super block
-   Copyright (C) 1994-2001 Free Software Foundation, Inc.
+   Copyright (C) 1994-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -70,5 +70,5 @@ main (int argc, char **argv)
     error (0, 0, _("ignoring all arguments"));
 
   sync ();
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 69ec56f8b62ad35ddb849f724421306072dece56..ab929c642e6696229d1691d2d5ab2a79657938d4 100644 (file)
--- a/src/tac.c
+++ b/src/tac.c
@@ -641,7 +641,7 @@ main (int argc, char **argv)
        case_GETOPT_HELP_CHAR;
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index c1d6034ce035dfe210ff5167a6835dd0f04d9d37..7c3240e9ba55421b41385e6e5b9989fe6b60fd85 100644 (file)
@@ -1558,7 +1558,7 @@ parse_options (int argc, char **argv,
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index f89f298ee898168196702eaac8bad42bab5303b4..9a1b3ce3b40c1160569b51557f2e6724f68e2925 100644 (file)
--- a/src/tee.c
+++ b/src/tee.c
@@ -110,7 +110,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
index 836277eee1ebbb3ec037b8709a51418bd09712cd..d352bb447caa2d2e5d6cbd79ac73980160bec0c0 100644 (file)
@@ -336,7 +336,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -347,7 +347,7 @@ main (int argc, char **argv)
       || (posix_date && flexible_date))
     {
       error (0, 0, _("cannot specify times from more than one source"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (use_ref)
@@ -390,7 +390,7 @@ main (int argc, char **argv)
   if (optind == argc)
     {
       error (0, 0, _("file arguments missing"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   for (; optind < argc; ++optind)
index c8a8735847ce1c1628974810119aae03dbc77516..ebd1d43f9cf7361256e3f154c2f5a341ad72e29f 100644 (file)
@@ -1,5 +1,5 @@
 /* tsort - topological sort.
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1998-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index d61961c019b8bfba4304334f6e98fd7f2406269d..46c20a7709f5b70d0bc233f782ef6e4d82b3eb9c 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
@@ -1,5 +1,5 @@
 /* tty -- print the path of the terminal connected to standard input
-   Copyright (C) 1990-2001 Free Software Foundation, Inc.
+   Copyright (C) 1990-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
index e35abfb54260a310c5c901266a13bc5686022f7c..ad487e334a7b2e2c7f8215494606dd08c5e4c012 100644 (file)
@@ -206,12 +206,12 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind != argc)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   if (toprint == 0)
     toprint = PRINT_KERNEL_NAME;
@@ -289,5 +289,5 @@ main (int argc, char **argv)
 
   putchar ('\n');
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 3b830d77135e6abec52a58993420a95f8cd87ace..8e58b2b402fe51cad028cc7cdefa91b8614eab7c 100644 (file)
@@ -430,7 +430,7 @@ main (int argc, char **argv)
          break;
 
        case '?':
-         usage (1);
+         usage (EXIT_FAILURE);
        case 'a':
          convert_entire_line = 1;
          break;
index 0683c8057b8ffc6027dea7e4d36fdd212154cfab..de556d7bd8f72b4a76799aa14704d88e611d3787 100644 (file)
@@ -431,7 +431,7 @@ main (int argc, char **argv)
          if (nfiles == 2)
            {
              error (0, 0, _("extra operand `%s'"), argv[optind]);
-             usage (1);
+             usage (EXIT_FAILURE);
            }
          file[nfiles++] = argv[optind++];
        }
@@ -448,7 +448,7 @@ main (int argc, char **argv)
            else if (nfiles == 2)
              {
                error (0, 0, _("extra operand `%s'"), optarg);
-               usage (1);
+               usage (EXIT_FAILURE);
              }
            else
              file[nfiles++] = optarg;
@@ -521,7 +521,7 @@ main (int argc, char **argv)
        case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -536,7 +536,7 @@ main (int argc, char **argv)
     {
       error (0, 0,
           _("printing all duplicated lines and repeat counts is meaningless"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   check_file (file[0], file[1]);
index bec995bddbfe0296219ad4440015072680d86409..7c8384951875204516a282484e812f27f70b3fe0 100644 (file)
@@ -1,5 +1,5 @@
 /* unlink utility for GNU.
-   Copyright (C) 20012002 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -86,17 +86,17 @@ main (int argc, char **argv)
   if (argc < 2)
     {
       error (0, 0, _("too few arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (2 < argc)
     {
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
   if (unlink (argv[1]) != 0)
     error (EXIT_FAILURE, errno, _("cannot unlink %s"), quote (argv[1]));
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index a2468e31944e3f5aae4003f3d667ed8be5008cf3..0aeb2db1d7a9c3f4eb40709f2f9e7d5529423480 100644 (file)
@@ -226,7 +226,7 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -242,8 +242,8 @@ main (int argc, char **argv)
 
     default:                   /* lose */
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 83192ae45cdb22bc7e5964773b3f09bc58d3a17d..341c5c06d09c6454d6469b8994f4f4da79a843ef 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU's users.
-   Copyright (C) 1992-2001 Free Software Foundation, Inc.
+   Copyright (C) 1992-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -151,7 +151,7 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -167,8 +167,8 @@ main (int argc, char **argv)
 
     default:                   /* lose */
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index 2ecb3be244817f9252352a84b24b84d4cfcba14a..c7688bdd77f81bc50725838b0d0b8feda3714b99 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -565,7 +565,7 @@ main (int argc, char **argv)
       case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
       default:
-       usage (1);
+       usage (EXIT_FAILURE);
       }
 
   if (print_lines + print_words + print_chars + print_bytes + print_linelength
index 4f8deff61416256f788b46730c849e07fc91dca6..4b16100aa131fdb86a0cf82d432d30093aa494f6 100644 (file)
--- a/src/who.c
+++ b/src/who.c
@@ -730,7 +730,7 @@ main (int argc, char **argv)
          case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
@@ -762,8 +762,8 @@ main (int argc, char **argv)
 
     default:                   /* lose */
       error (0, 0, _("too many arguments"));
-      usage (1);
+      usage (EXIT_FAILURE);
     }
 
-  exit (0);
+  exit (EXIT_SUCCESS);
 }
index d3d03d9057147eecb5666e32f1425afc47883b93..583ed02c286c453b0e6088fbdbfe6c56bc1c890c 100644 (file)
@@ -1,5 +1,5 @@
 /* whoami -- print effective userid
-   Copyright (C) 89,90, 1991-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 89,90, 1991-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -87,21 +87,21 @@ main (int argc, char **argv)
          break;
 
        default:
-         usage (1);
+         usage (EXIT_FAILURE);
        }
     }
 
   if (optind != argc)
-    usage (1);
+    usage (EXIT_FAILURE);
 
   uid = geteuid ();
   pw = getpwuid (uid);
   if (pw)
     {
       puts (pw->pw_name);
-      exit (0);
+      exit (EXIT_SUCCESS);
     }
   fprintf (stderr, _("%s: cannot find username for UID %u\n"),
           program_name, (unsigned) uid);
-  exit (1);
+  exit (EXIT_FAILURE);
 }
index d743501fc28a48abf408a322629d7ca711c657b9..09d6ee9d1e4c76916fe203298b4a042d07da6d63 100644 (file)
--- a/src/yes.c
+++ b/src/yes.c
@@ -1,5 +1,5 @@
 /* yes - output a string repeatedly until killed
-   Copyright (C) 1991-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1991-1997, 1999-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by