/* cp.c -- file copying (main routines)
- Copyright (C) 89, 90, 91, 1995-2003 Free Software Foundation.
+ Copyright (C) 89, 90, 91, 1995-2004 Free Software Foundation.
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
I_ALWAYS_YES, I_ALWAYS_NO, I_ASK_USER
};
-/* The error code to return to the system. */
-static int exit_status = 0;
-
static struct option const long_opts[] =
{
{"archive", no_argument, NULL, 'a'},
void
usage (int status)
{
- if (status != 0)
+ if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
main (int argc, char **argv)
{
int c;
+ int exit_status;
int make_backups = 0;
char *backup_suffix_string;
char *version_control_string = NULL;
hash_init ();
- exit_status |= do_copy (argc - optind, argv + optind, target_directory, &x);
+ exit_status = do_copy (argc - optind, argv + optind, target_directory, &x);
forget_all ();