summaryrefslogtreecommitdiff
path: root/src/ln.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-16 16:14:56 +0000
committerJim Meyering <jim@meyering.net>1999-01-16 16:14:56 +0000
commitfadedac410dcbd4157d8b4ac7bc4d7026a6c18ef (patch)
tree2f9c5ce5411112f9157d8e90f94d99ca128556c9 /src/ln.c
parent06f14ae76019ba7cfec51bb036d3356e6a71241a (diff)
downloadcoreutils-fadedac410dcbd4157d8b4ac7bc4d7026a6c18ef.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/ln.c')
-rw-r--r--src/ln.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/ln.c b/src/ln.c
index d15060e85..da70fe7df 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -1,5 +1,5 @@
/* `ln' program to create links between files.
- Copyright (C) 86, 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 86, 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
@@ -58,8 +58,6 @@ int symlink ();
} \
while (0)
-char *base_name ();
-enum backup_type get_version ();
int isdir ();
int yesno ();
void strip_trailing_slashes ();
@@ -317,7 +315,7 @@ do_link (const char *source, const char *dest)
return 1;
}
-static void
+void
usage (int status)
{
if (status != 0)
@@ -354,9 +352,10 @@ with --symbolic. When creating hard links, each TARGET must exist.\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 ();
@@ -377,10 +376,12 @@ main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ /* 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;
symbolic_link = remove_existing_files = interactive = verbose
= hard_dir_link = 0;
@@ -449,7 +450,9 @@ main (int argc, char **argv)
usage (1);
}
- backup_type = (make_backups ? get_version (version) : none);
+ backup_type = (make_backups
+ ? xget_version (_("--version-control"), version)
+ : none);
#ifdef S_ISLNK
if (symbolic_link)