summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-16 16:14:31 +0000
committerJim Meyering <jim@meyering.net>1999-01-16 16:14:31 +0000
commit06f14ae76019ba7cfec51bb036d3356e6a71241a (patch)
treeafde3144781a5fc515e684a82c5e4ba25b6ec8ca /src
parent1592f752f666765d7ad4f72d11f2026381442b86 (diff)
downloadcoreutils-06f14ae76019ba7cfec51bb036d3356e6a71241a.tar.xz
Remove declarations of base_name and get_version.
(main): Don't call getenv ("VERSION_CONTROL"); xget_version does it. Use xget_version and function-style XARGMATCH.
Diffstat (limited to 'src')
-rw-r--r--src/install.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/install.c b/src/install.c
index daf2bbf3c..f736b655b 100644
--- a/src/install.c
+++ b/src/install.c
@@ -1,5 +1,5 @@
/* install - copy files and set attributes
- Copyright (C) 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 89, 90, 91, 95, 96, 97, 1998, 1999 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
@@ -119,10 +119,8 @@ gid_t getgid ();
/* Number of bytes of a file to copy at a time. */
#define READ_SIZE (32 * 1024)
-char *base_name ();
int full_write ();
int isdir ();
-enum backup_type get_version ();
int stat ();
@@ -138,7 +136,7 @@ static int install_file_in_file PARAMS ((const char *from, const char *to,
const struct cp_options *x));
static void get_ids PARAMS ((void));
static void strip PARAMS ((const char *path));
-static void usage PARAMS ((int status));
+void usage PARAMS ((int status));
/* The name this program was run with, for error messages. */
char *program_name;
@@ -254,10 +252,12 @@ main (int argc, char **argv)
dir_arg = 0;
umask (0);
+ /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
+ we'll actually use simple_backup_suffix. */
version = getenv ("SIMPLE_BACKUP_SUFFIX");
if (version)
simple_backup_suffix = version;
- version = getenv ("VERSION_CONTROL");
+ version = NULL;
while ((optc = getopt_long (argc, argv, "bcsDdg:m:o:pvV:S:", long_options,
NULL)) != -1)
@@ -321,7 +321,7 @@ main (int argc, char **argv)
error (1, 0,
_("the strip option may not be used when installing a directory"));
- x.backup_type = (make_backups ? get_version (version) : none);
+ x.backup_type = xget_version ("--version-control", version);
n_files = argc - optind;
file = argv + optind;
@@ -632,7 +632,7 @@ get_ids (void)
group_id = (gid_t) -1;
}
-static void
+void
usage (int status)
{
if (status != 0)
@@ -674,9 +674,10 @@ In the third format, create all components of the given DIRECTORY(ies).\n\
The backup suffix is ~, unless set with SIMPLE_BACKUP_SUFFIX. The\n\
version control may be set with VERSION_CONTROL, values are:\n\
\n\
- t, numbered make numbered backups\n\
- nil, existing numbered if numbered backups exist, simple otherwise\n\
- never, simple always make simple backups\n\
+ none, off never make backups (even if --backup is given)\n\
+ numbered, t make numbered backups\n\
+ existing, nil numbered if numbered backups exist, simple otherwise\n\
+ simple, never always make simple backups\n\
"));
puts (_("\nReport bugs to <bug-fileutils@gnu.org>."));
close_stdout ();