/* 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
{
error (0, 0, (argc == 1 ? _("too few arguments")
: _("too many arguments")));
- usage (1);
+ usage (EXIT_FAILURE);
}
name = base_name (argv[1]);
puts (name);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* 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
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)
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);
}
changes = (reference_file ? mode_create_from_ref (reference_file)
/* 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
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)
if (argc == 1)
{
error (0, 0, _("too few arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (chroot (argv[1]))
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
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);
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)
{
error (0, 0, _("%s: specified target is not a directory"),
quote (dest));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (n_files > 1)
error (0, 0,
_("copying multiple files, but last argument %s is not a directory"),
quote (dest));
- usage (1);
+ usage (EXIT_FAILURE);
}
}
{
error (0, 0,
_("when preserving paths, the destination must be a directory"));
- usage (1);
+ usage (EXIT_FAILURE);
}
source = file[0];
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)
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)
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
n_args = argc - optind;
{
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)
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. */
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)
if (conversions[i].convname == NULL)
{
error (0, 0, _("invalid conversion: %s"), quote (str));
- usage (1);
+ usage (EXIT_FAILURE);
}
str = new;
} while (new != NULL);
if (val == NULL)
{
error (0, 0, _("unrecognized option %s"), quote (name));
- usage (1);
+ usage (EXIT_FAILURE);
}
*val++ = '\0';
{
error (0, 0, _("unrecognized option %s=%s"),
quote_n (0, name), quote_n (1, val));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (invalid)
{
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;
}
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
}
}
if (match)
- exit (1);
+ exit (EXIT_FAILURE);
}
{
/* 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
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
argc -= optind;
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)
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)
{
error (0, 0, argc < 2 ? _("too few arguments")
: _("too many arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
result = argv[1];
fwrite (result, 1, len, stdout);
putchar ('\n');
- exit (0);
+ exit (EXIT_SUCCESS);
}
if (cwd)
{
if (restore_cwd (cwd, "..", curr_dir_name))
- exit (1);
+ exit (EXIT_FAILURE);
free_cwd (cwd);
}
else if (chdir ("..") < 0)
&& S_ISLNK (e_buf.st_mode)))
{
if (save_cwd (&cwd_buf))
- exit (1);
+ exit (EXIT_FAILURE);
cwd = &cwd_buf;
}
else
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)
error (0, 0,
_("warning: summarizing conflicts with --max-depth=%d"),
max_depth);
- usage (1);
+ usage (EXIT_FAILURE);
}
if (opt_summarize_only)
/* 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
}
if (display_return)
putchar ('\n');
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* 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
{
while (*environ)
puts (*environ++);
- exit (0);
+ exit (EXIT_SUCCESS);
}
execvp (argv[optind], &argv[optind]);
break;
case '?':
- usage (1);
+ usage (EXIT_FAILURE);
case 'i':
convert_entire_line = 0;
break;
if (argc == 1)
{
error (0, 0, _("too few arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
args = argv + 1;
/* 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
fail |= print_factors (argv[i]);
}
if (fail)
- usage (1);
+ usage (EXIT_FAILURE);
exit (fail);
}
/* 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
switch (optchar)
{
default:
- usage (1);
+ usage (EXIT_FAILURE);
case 0:
break;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
default:
error (0, 0, _("unrecognized option `-%c'"), *a);
- usage (1);
+ usage (EXIT_FAILURE);
}
}
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
/* 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
if (argc > 1)
{
error (0, 0, _("too many arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
id = gethostid ();
/* 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
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)
else
{
error (2, 0, _("too many arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
- exit (0);
+ exit (EXIT_SUCCESS);
}
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
_("cannot print only names or real IDs in default format"));
if (argc - optind > 1)
- usage (1);
+ usage (EXIT_FAILURE);
if (argc - optind == 1)
{
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
if (n_files == 0 || (n_files == 1 && !dir_arg))
{
error (0, 0, _("too few arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (specified_mode)
_("installing multiple files, but last argument, %s \
is not a directory"),
quote (dest));
- usage (1);
+ usage (EXIT_FAILURE);
}
dest_info_init (&x);
if (nfiles > 1)
{
error (0, 0, _("too many non-option arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
names[nfiles++] = optarg;
break;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
prev_optc = optc;
}
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");
/* 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
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);
}
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
break;
}
}
if (n_files == 0)
{
error (0, 0, _("missing file argument"));
- usage (1);
+ usage (EXIT_FAILURE);
}
target_directory_specified = (target_directory != NULL);
{
error (0, 0, _("%s: specified target directory is not a directory"),
quote (target_directory));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (backup_suffix_string)
/* 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
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);
}
/* 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
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;
/* 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
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);
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
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
error (0, 0, _("\
when creating special files, major and minor device\n\
numbers must be specified"));
- usage (1);
+ usage (EXIT_FAILURE);
}
{
{
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]));
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
quote (argv[optind]));
}
- exit (0);
+ exit (EXIT_SUCCESS);
}
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
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)
{
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)
switch (optc)
{
case '?':
- usage (1);
+ usage (EXIT_FAILURE);
case 'n':
if (xstrtol (optarg, NULL, 10, &adjustment, "")
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;
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
/* 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
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
break;
}
}
error (0, 0,
_("invalid second operand in compatibility mode `%s'"),
argv[optind + 1]);
- usage (1);
+ usage (EXIT_FAILURE);
}
}
else if (n_files == 3)
{
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)
/* 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
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
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)
/* 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
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
{
error (0, 0, _("no username specified; at least one must be\
specified when using -l"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (do_short_format)
else
long_pinky (n_users, argv + optind);
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* 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
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
/* 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
putchar (8);
break;
case 'c': /* Cancel the rest of the output. */
- exit (0);
+ exit (EXIT_SUCCESS);
break;
case 'f': /* Form feed. */
putchar (12);
if (argc == 1)
{
fprintf (stderr, _("Usage: %s format [argument...]\n"), program_name);
- exit (1);
+ exit (EXIT_FAILURE);
}
format = argv[1];
/* 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
error (EXIT_FAILURE, errno, _("cannot get current directory"));
printf ("%s\n", wd);
- exit (0);
+ exit (EXIT_SUCCESS);
}
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);
}
}
/* 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
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)
if (xstrtod (arg, NULL, &ret_val))
{
error (0, 0, _("invalid floating point argument: %s"), arg);
- usage (1);
+ usage (EXIT_FAILURE);
}
return ret_val;
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);
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);
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++]);
{
error (0, 0, _("\
format string may not be specified when printing equal width strings"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (!step_is_set)
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
if (n_files == 0)
{
error (0, 0, _("missing file argument"));
- usage (1);
+ usage (EXIT_FAILURE);
}
for (i = 0; i < n_files; i++)
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
if (argc == 1)
{
error (0, 0, _("too few arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
#ifdef FE_UPWARD
}
if (fail)
- usage (1);
+ usage (EXIT_FAILURE);
/* Separate whole seconds from nanoseconds.
Be careful to detect any overflow. */
clock_get_realtime (&ts_start)))
continue;
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* 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
max_col = screen_columns ();
current_col = 0;
display_settings (output_type, &mode, fd, device_name);
- exit (0);
+ exit (EXIT_SUCCESS);
}
speed_was_set = 0;
if (match_found == 0 && reversed)
{
error (0, 0, _("invalid argument `%s'"), --argv[k]);
- usage (1);
+ usage (EXIT_FAILURE);
}
if (match_found == 0)
{
if (k == argc - 1)
{
error (0, 0, _("missing argument to `%s'"), argv[k]);
- usage (1);
+ usage (EXIT_FAILURE);
}
match_found = 1;
++k;
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);
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);
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,
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]),
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]);
if (recover_mode (argv[k], &mode) == 0)
{
error (0, 0, _("invalid argument `%s'"), argv[k]);
- usage (1);
+ usage (EXIT_FAILURE);
}
require_set_attr = 1;
}
}
}
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* Return 0 if not applied because not reversible; otherwise return 1. */
if (xstrtol (s, NULL, 0, &value, "bB") != LONGINT_OK)
{
error (0, 0, _("invalid integer argument `%s'"), s);
- usage (1);
+ usage (EXIT_FAILURE);
}
return value;
}
/* 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
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
/* 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
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
/* 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
error (0, 0, _("ignoring all arguments"));
sync ();
- exit (0);
+ exit (EXIT_SUCCESS);
}
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
|| (posix_date && flexible_date))
{
error (0, 0, _("cannot specify times from more than one source"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (use_ref)
if (optind == argc)
{
error (0, 0, _("file arguments missing"));
- usage (1);
+ usage (EXIT_FAILURE);
}
for (; optind < argc; ++optind)
/* 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
/* 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
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;
putchar ('\n');
- exit (0);
+ exit (EXIT_SUCCESS);
}
break;
case '?':
- usage (1);
+ usage (EXIT_FAILURE);
case 'a':
convert_entire_line = 1;
break;
if (nfiles == 2)
{
error (0, 0, _("extra operand `%s'"), argv[optind]);
- usage (1);
+ usage (EXIT_FAILURE);
}
file[nfiles++] = argv[optind++];
}
else if (nfiles == 2)
{
error (0, 0, _("extra operand `%s'"), optarg);
- usage (1);
+ usage (EXIT_FAILURE);
}
else
file[nfiles++] = optarg;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
{
error (0, 0,
_("printing all duplicated lines and repeat counts is meaningless"));
- usage (1);
+ usage (EXIT_FAILURE);
}
check_file (file[0], file[1]);
/* 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
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);
}
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
default: /* lose */
error (0, 0, _("too many arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* 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
break;
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
default: /* lose */
error (0, 0, _("too many arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
- exit (0);
+ exit (EXIT_SUCCESS);
}
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
if (print_lines + print_words + print_chars + print_bytes + print_linelength
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
default:
- usage (1);
+ usage (EXIT_FAILURE);
}
}
default: /* lose */
error (0, 0, _("too many arguments"));
- usage (1);
+ usage (EXIT_FAILURE);
}
- exit (0);
+ exit (EXIT_SUCCESS);
}
/* 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
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);
}
/* 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