summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-05-27 11:04:41 +0000
committerJim Meyering <jim@meyering.net>1997-05-27 11:04:41 +0000
commit4c2adcbd56def9b5897a1a462998e77233d83542 (patch)
treed64d2b06fc75d3ce761ac2ac7b315276f466e585 /src
parentf0c27dac9e8762833da5a6c16450192569bebd9f (diff)
downloadcoreutils-4c2adcbd56def9b5897a1a462998e77233d83542.tar.xz
Use base_name, not basename.
Diffstat (limited to 'src')
-rw-r--r--src/dircolors.c6
-rw-r--r--src/install.c4
-rw-r--r--src/ln.c8
-rw-r--r--src/mv.c4
-rw-r--r--src/rm.c4
5 files changed, 13 insertions, 13 deletions
diff --git a/src/dircolors.c b/src/dircolors.c
index 56bd35978..f3a480809 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 H. Peter Anvin
+ Copyright (C) 1994, 1995, 1997 H. Peter Anvin
Copyright (C) 96, 1997 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -40,7 +40,7 @@ void free ();
#endif
char *xmalloc ();
-char *basename ();
+char *base_name ();
char *strndup();
enum Shell_syntax
@@ -145,7 +145,7 @@ guess_shell_syntax (void)
if (shell == NULL || *shell == '\0')
return SHELL_SYNTAX_UNKNOWN;
- shell = basename (shell);
+ shell = base_name (shell);
if (STREQ (shell, "csh") || STREQ (shell, "tcsh"))
return SHELL_SYNTAX_C;
diff --git a/src/install.c b/src/install.c
index ddc912427..eb8059dae 100644
--- a/src/install.c
+++ b/src/install.c
@@ -114,7 +114,7 @@ gid_t getgid ();
* BITSPERBYTE - 1)))))
#endif
-char *basename ();
+char *base_name ();
char *stpcpy ();
char *xmalloc ();
int safe_read ();
@@ -338,7 +338,7 @@ install_file_in_dir (char *from, char *to_dir)
char *to;
int ret;
- from_base = basename (from);
+ from_base = base_name (from);
to = xmalloc ((unsigned) (strlen (to_dir) + strlen (from_base) + 2));
stpcpy (stpcpy (stpcpy (to, to_dir), "/"), from_base);
ret = install_file_in_file (from, to);
diff --git a/src/ln.c b/src/ln.c
index a4966ad9d..492d4598a 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -48,7 +48,7 @@ int symlink ();
tmp_source = (char *) alloca (strlen ((source)) + 1); \
strcpy (tmp_source, (source)); \
strip_trailing_slashes (tmp_source); \
- source_base = basename (tmp_source); \
+ source_base = base_name (tmp_source); \
\
(new_dest) = (char *) alloca (strlen ((dest)) + 1 \
+ strlen (source_base) + 1); \
@@ -56,7 +56,7 @@ int symlink ();
} \
while (0)
-char *basename ();
+char *base_name ();
char *dirname ();
enum backup_type get_version ();
int isdir ();
@@ -146,7 +146,7 @@ same_name (const char *source, const char *dest)
return (source_dir_stats.st_dev == dest_dir_stats.st_dev
&& source_dir_stats.st_ino == dest_dir_stats.st_ino
- && STREQ (basename (source), basename (dest)));
+ && STREQ (base_name (source), base_name (dest)));
}
/* Make a link DEST to the (usually) existing file SOURCE.
@@ -216,7 +216,7 @@ do_link (const char *source, const char *dest)
/* If the destination is a directory or (it is a symlink to a directory
and the user has not specified --no-dereference), then form the
- actual destination name by appending basename (source) to the
+ actual destination name by appending base_name (source) to the
specified destination directory. */
if ((lstat_status == 0
&& S_ISDIR (dest_stats.st_mode))
diff --git a/src/mv.c b/src/mv.c
index 1979c65ca..7acb9ce17 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -59,7 +59,7 @@
uid_t geteuid ();
#endif
-char *basename ();
+char *base_name ();
enum backup_type get_version ();
int isdir ();
int yesno ();
@@ -357,7 +357,7 @@ movefile (const char *source, const char *dest)
char *new_dest;
int fail;
- base = basename (source);
+ base = base_name (source);
new_dest = path_concat (dest, base, NULL);
if (new_dest == NULL)
error (1, 0, _("virtual memory exhausted"));
diff --git a/src/rm.c b/src/rm.c
index 641ec1411..4f226426f 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -42,7 +42,7 @@ struct pathstack
ino_t inum;
};
-char *basename ();
+char *base_name ();
char *stpcpy ();
char *xmalloc ();
char *xrealloc ();
@@ -205,7 +205,7 @@ static int
rm (void)
{
struct stat path_stats;
- char *base = basename (pathname);
+ char *base = base_name (pathname);
if (base[0] == '.' && (base[1] == '\0'
|| (base[1] == '.' && base[2] == '\0')))