From 4006f4e672123e0189e58d4f76b58d06ae30eb94 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 31 Aug 2002 08:52:10 +0000 Subject: Change `exit (0)' to `exit (EXIT_SUCCESS)', `exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'. --- src/basename.c | 6 +++--- src/chgrp.c | 6 +++--- src/chmod.c | 4 ++-- src/chown.c | 6 +++--- src/chroot.c | 2 +- src/cksum.c | 2 +- src/comm.c | 4 ++-- src/cp.c | 14 +++++++------- src/csplit.c | 4 ++-- src/date.c | 12 ++++++------ src/dd.c | 6 +++--- src/df.c | 6 +++--- src/dircolors.c | 10 +++++----- src/dirname.c | 4 ++-- src/du.c | 10 +++++----- src/echo.c | 4 ++-- src/env.c | 4 ++-- src/expand.c | 2 +- src/expr.c | 2 +- src/factor.c | 4 ++-- src/fmt.c | 4 ++-- src/fold.c | 2 +- src/head.c | 4 ++-- src/hostid.c | 4 ++-- src/hostname.c | 8 ++++---- src/id.c | 4 ++-- src/install.c | 6 +++--- src/join.c | 6 +++--- src/link.c | 8 ++++---- src/ln.c | 6 +++--- src/logname.c | 10 +++++----- src/mkdir.c | 6 +++--- src/mkfifo.c | 6 +++--- src/mknod.c | 12 ++++++------ src/mv.c | 8 ++++---- src/nice.c | 6 +++--- src/nl.c | 2 +- src/od.c | 8 ++++---- src/paste.c | 4 ++-- src/pathchk.c | 4 ++-- src/pinky.c | 8 ++++---- src/printenv.c | 4 ++-- src/printf.c | 6 +++--- src/pwd.c | 4 ++-- src/rm.c | 6 +++--- src/rmdir.c | 6 +++--- src/seq.c | 16 ++++++++-------- src/shred.c | 4 ++-- src/sleep.c | 8 ++++---- src/stty.c | 24 ++++++++++++------------ src/su.c | 4 ++-- src/sum.c | 4 ++-- src/sync.c | 4 ++-- src/tac.c | 2 +- src/tail.c | 2 +- src/tee.c | 2 +- src/touch.c | 6 +++--- src/tsort.c | 2 +- src/tty.c | 2 +- src/uname.c | 6 +++--- src/unexpand.c | 2 +- src/uniq.c | 8 ++++---- src/unlink.c | 8 ++++---- src/uptime.c | 6 +++--- src/users.c | 8 ++++---- src/wc.c | 2 +- src/who.c | 6 +++--- src/whoami.c | 10 +++++----- src/yes.c | 2 +- 69 files changed, 201 insertions(+), 201 deletions(-) diff --git a/src/basename.c b/src/basename.c index 139b9e90c..aa0e14161 100644 --- a/src/basename.c +++ b/src/basename.c @@ -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); } diff --git a/src/chgrp.c b/src/chgrp.c index 491433090..5727b2720 100644 --- a/src/chgrp.c +++ b/src/chgrp.c @@ -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) diff --git a/src/chmod.c b/src/chmod.c index 8abbd618b..cc0e0f2e4 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -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) diff --git a/src/chown.c b/src/chown.c index 5320f7ade..0a5609620 100644 --- a/src/chown.c +++ b/src/chown.c @@ -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) diff --git a/src/chroot.c b/src/chroot.c index f63ab2a53..cbec705c2 100644 --- a/src/chroot.c +++ b/src/chroot.c @@ -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])) diff --git a/src/cksum.c b/src/cksum.c index 7d0fdc75d..c7de79edf 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -319,7 +319,7 @@ main (int argc, char **argv) break; default: - usage (1); + usage (EXIT_FAILURE); } } diff --git a/src/comm.c b/src/comm.c index 7da3de20b..00b14357c 100644 --- a/src/comm.c +++ b/src/comm.c @@ -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); diff --git a/src/cp.c b/src/cp.c index 36a66e059..76e124aab 100644 --- 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) diff --git a/src/csplit.c b/src/csplit.c index ebc930686..f8c179368 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -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) diff --git a/src/date.c b/src/date.c index bc0c81a5a..bf1332b7a 100644 --- a/src/date.c +++ b/src/date.c @@ -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) diff --git a/src/dd.c b/src/dd.c index da3c87d55..d082c3442 100644 --- 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) diff --git a/src/df.c b/src/df.c index 05364c82d..f72c53873 100644 --- 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); } { diff --git a/src/dircolors.c b/src/dircolors.c index f9b6c1488..bf2b2c2a0 100644 --- a/src/dircolors.c +++ b/src/dircolors.c @@ -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) diff --git a/src/dirname.c b/src/dirname.c index 6dfb0b340..e88e6a21c 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -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); } diff --git a/src/du.c b/src/du.c index 7e29a96d3..68121baee 100644 --- 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) diff --git a/src/echo.c b/src/echo.c index 929f10106..3538ed503 100644 --- a/src/echo.c +++ b/src/echo.c @@ -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); } diff --git a/src/env.c b/src/env.c index 59bd03839..163c4fbee 100644 --- 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]); diff --git a/src/expand.c b/src/expand.c index 1ce8ac72c..84d14d924 100644 --- a/src/expand.c +++ b/src/expand.c @@ -358,7 +358,7 @@ main (int argc, char **argv) break; case '?': - usage (1); + usage (EXIT_FAILURE); case 'i': convert_entire_line = 0; break; diff --git a/src/expr.c b/src/expr.c index 18000705d..6b705d467 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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; diff --git a/src/factor.c b/src/factor.c index 491f406f2..c78cebbde 100644 --- a/src/factor.c +++ b/src/factor.c @@ -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); } diff --git a/src/fmt.c b/src/fmt.c index f86513f33..fbc2c578d 100644 --- 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; diff --git a/src/fold.c b/src/fold.c index be1d669da..cf8867369 100644 --- a/src/fold.c +++ b/src/fold.c @@ -302,7 +302,7 @@ main (int argc, char **argv) case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: - usage (1); + usage (EXIT_FAILURE); } } diff --git a/src/head.c b/src/head.c index f0879a1d1..540d601c4 100644 --- a/src/head.c +++ b/src/head.c @@ -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); } } diff --git a/src/hostid.c b/src/hostid.c index 21bbde7c6..d27207baf 100644 --- a/src/hostid.c +++ b/src/hostid.c @@ -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 (); diff --git a/src/hostname.c b/src/hostname.c index c004523ca..3f13b072e 100644 --- a/src/hostname.c +++ b/src/hostname.c @@ -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); } diff --git a/src/id.c b/src/id.c index 9f2bd460a..4044b0383 100644 --- 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) { diff --git a/src/install.c b/src/install.c index 1afcdcaca..3be52b095 100644 --- a/src/install.c +++ b/src/install.c @@ -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); diff --git a/src/join.c b/src/join.c index b6f2c6922..368ea22b8 100644 --- a/src/join.c +++ b/src/join.c @@ -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"); diff --git a/src/link.c b/src/link.c index d5c655ba3..760ad945b 100644 --- a/src/link.c +++ b/src/link.c @@ -1,5 +1,5 @@ /* link utility for GNU. - Copyright (C) 2001, 2002 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); } diff --git a/src/ln.c b/src/ln.c index 06589f58c..a674ad25a 100644 --- 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) diff --git a/src/logname.c b/src/logname.c index b3fe3eb17..d86fab0e8 100644 --- a/src/logname.c +++ b/src/logname.c @@ -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); } diff --git a/src/mkdir.c b/src/mkdir.c index 877fd9812..5df9c1849 100644 --- a/src/mkdir.c +++ b/src/mkdir.c @@ -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; diff --git a/src/mkfifo.c b/src/mkfifo.c index ae2ee326f..2fa279e8e 100644 --- a/src/mkfifo.c +++ b/src/mkfifo.c @@ -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); diff --git a/src/mknod.c b/src/mknod.c index 66ccba06a..21498568f 100644 --- a/src/mknod.c +++ b/src/mknod.c @@ -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); } diff --git a/src/mv.c b/src/mv.c index cdf3d9a33..77fb9ff9e 100644 --- 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) diff --git a/src/nice.c b/src/nice.c index 13122d92f..f8b5b85f2 100644 --- a/src/nice.c +++ b/src/nice.c @@ -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 diff --git a/src/nl.c b/src/nl.c index 5204380fc..065aa4e52 100644 --- 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 diff --git a/src/od.c b/src/od.c index 6c0de1874..a3836bb0f 100644 --- 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) diff --git a/src/paste.c b/src/paste.c index 3814c5a08..839fef15f 100644 --- a/src/paste.c +++ b/src/paste.c @@ -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); } } diff --git a/src/pathchk.c b/src/pathchk.c index fa81b1b68..3fcc12924 100644 --- a/src/pathchk.c +++ b/src/pathchk.c @@ -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) diff --git a/src/pinky.c b/src/pinky.c index d25317ece..59400d785 100644 --- a/src/pinky.c +++ b/src/pinky.c @@ -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); } diff --git a/src/printenv.c b/src/printenv.c index 68608e113..89472ff8d 100644 --- a/src/printenv.c +++ b/src/printenv.c @@ -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); } } diff --git a/src/printf.c b/src/printf.c index 38e02c914..b7eceffa4 100644 --- a/src/printf.c +++ b/src/printf.c @@ -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]; diff --git a/src/pwd.c b/src/pwd.c index 6a4ce2ae0..9e53b6143 100644 --- 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); } diff --git a/src/rm.c b/src/rm.c index 7c56280da..5df4ed861 100644 --- 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); } } diff --git a/src/rmdir.c b/src/rmdir.c index bacc911f0..4c401350d 100644 --- a/src/rmdir.c +++ b/src/rmdir.c @@ -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) diff --git a/src/seq.c b/src/seq.c index 6acb6115d..58bb59b4a 100644 --- 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) diff --git a/src/shred.c b/src/shred.c index da2b78834..ced548308 100644 --- a/src/shred.c +++ b/src/shred.c @@ -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++) diff --git a/src/sleep.c b/src/sleep.c index 62b1f16f8..2c590c9c7 100644 --- a/src/sleep.c +++ b/src/sleep.c @@ -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); } diff --git a/src/stty.c b/src/stty.c index ed9ec5566..de4e26193 100644 --- a/src/stty.c +++ b/src/stty.c @@ -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; } diff --git a/src/su.c b/src/su.c index 5b1328ccf..ae67bf9f3 100644 --- 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); } } diff --git a/src/sum.c b/src/sum.c index 302ade014..3ce48f439 100644 --- 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); } } diff --git a/src/sync.c b/src/sync.c index 2e1015764..2b8c50ee8 100644 --- a/src/sync.c +++ b/src/sync.c @@ -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); } diff --git a/src/tac.c b/src/tac.c index 69ec56f8b..ab929c642 100644 --- 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); } } diff --git a/src/tail.c b/src/tail.c index c1d6034ce..7c3240e9b 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1558,7 +1558,7 @@ parse_options (int argc, char **argv, case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: - usage (1); + usage (EXIT_FAILURE); } } diff --git a/src/tee.c b/src/tee.c index f89f298ee..9a1b3ce3b 100644 --- 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); } } diff --git a/src/touch.c b/src/touch.c index 836277eee..d352bb447 100644 --- a/src/touch.c +++ b/src/touch.c @@ -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) diff --git a/src/tsort.c b/src/tsort.c index c8a873584..ebd1d43f9 100644 --- a/src/tsort.c +++ b/src/tsort.c @@ -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 diff --git a/src/tty.c b/src/tty.c index d61961c01..46c20a770 100644 --- 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 diff --git a/src/uname.c b/src/uname.c index e35abfb54..ad487e334 100644 --- a/src/uname.c +++ b/src/uname.c @@ -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); } diff --git a/src/unexpand.c b/src/unexpand.c index 3b830d771..8e58b2b40 100644 --- a/src/unexpand.c +++ b/src/unexpand.c @@ -430,7 +430,7 @@ main (int argc, char **argv) break; case '?': - usage (1); + usage (EXIT_FAILURE); case 'a': convert_entire_line = 1; break; diff --git a/src/uniq.c b/src/uniq.c index 0683c8057..de556d7bd 100644 --- a/src/uniq.c +++ b/src/uniq.c @@ -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]); diff --git a/src/unlink.c b/src/unlink.c index bec995bdd..7c8384951 100644 --- a/src/unlink.c +++ b/src/unlink.c @@ -1,5 +1,5 @@ /* unlink utility for GNU. - Copyright (C) 2001, 2002 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); } diff --git a/src/uptime.c b/src/uptime.c index a2468e319..0aeb2db1d 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -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); } diff --git a/src/users.c b/src/users.c index 83192ae45..341c5c06d 100644 --- a/src/users.c +++ b/src/users.c @@ -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); } diff --git a/src/wc.c b/src/wc.c index 2ecb3be24..c7688bdd7 100644 --- 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 diff --git a/src/who.c b/src/who.c index 4f8deff61..4b16100aa 100644 --- 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); } diff --git a/src/whoami.c b/src/whoami.c index d3d03d905..583ed02c2 100644 --- a/src/whoami.c +++ b/src/whoami.c @@ -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); } diff --git a/src/yes.c b/src/yes.c index d743501fc..09d6ee9d1 100644 --- 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 -- cgit v1.2.3-54-g00ecf