diff options
author | Jim Meyering <jim@meyering.net> | 1998-12-07 06:20:50 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-12-07 06:20:50 +0000 |
commit | 52dedbfebbb911c39feeb052e4bcd26b2a99a2c9 (patch) | |
tree | a893189a382b2b7a2fd075ed8b1128b4448d2a81 /src | |
parent | f5e9896c186513a956952a951b3a417467dff6b6 (diff) | |
download | coreutils-52dedbfebbb911c39feeb052e4bcd26b2a99a2c9.tar.xz |
Use dir_name, not dirname. Include dirname.h.
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.c | 4 | ||||
-rw-r--r-- | src/cp.c | 8 | ||||
-rw-r--r-- | src/df.c | 4 | ||||
-rw-r--r-- | src/install.c | 4 | ||||
-rw-r--r-- | src/ln.c | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/copy.c b/src/copy.c index 3b1acdfe1..401ea79ed 100644 --- a/src/copy.c +++ b/src/copy.c @@ -33,6 +33,7 @@ #include "copy.h" #include "cp-hash.h" #include "path-concat.h" +#include "dirname.h" #define DO_CHOWN(Chown, File, New_uid, New_gid) \ (Chown ((File), (x->myeuid == 0 ? (New_uid) : x->myeuid), (New_gid)) \ @@ -51,7 +52,6 @@ struct dir_list int full_write (); int euidaccess (); int yesno (); -char *dirname (); static int copy_internal PARAMS ((const char *src_path, const char *dst_path, int new_dst, dev_t device, @@ -700,7 +700,7 @@ copy_internal (const char *src_path, const char *dst_path, char *dst_parent; int in_current_dir; - dst_parent = dirname (dst_path); + dst_parent = dir_name (dst_path); if (dst_parent == NULL) error (1, 0, _("virtual memory exhausted")); @@ -35,6 +35,7 @@ #include "cp-hash.h" #include "copy.h" #include "error.h" +#include "dirname.h" #ifndef _POSIX_VERSION uid_t geteuid (); @@ -54,7 +55,6 @@ int stat (); int lstat (); char *base_name (); -char *dirname (); enum backup_type get_version (); void strip_trailing_slashes (); char *xstrdup (); @@ -308,7 +308,7 @@ make_path_private (const char *const_dirpath, int src_offset, int mode, src = dirpath + src_offset; - tmp_dst_dirname = dirname (dirpath); + tmp_dst_dirname = dir_name (dirpath); dst_dirname = (char *) alloca (strlen (tmp_dst_dirname) + 1); strcpy (dst_dirname, tmp_dst_dirname); free (tmp_dst_dirname); @@ -444,7 +444,7 @@ do_copy (int argc, char **argv, const struct cp_options *x) char *arg; char *ap; char *dst_path; - int parent_exists = 1; /* True if dirname (dst_path) exists. */ + int parent_exists = 1; /* True if dir_name (dst_path) exists. */ struct dir_attr *attr_list; char *arg_in_concat = NULL; @@ -460,7 +460,7 @@ do_copy (int argc, char **argv, const struct cp_options *x) error (1, 0, _("virtual memory exhausted")); /* For --parents, we have to make sure that the directory - dirname (dst_path) exists. We may have to create a few + dir_name (dst_path) exists. We may have to create a few leading directories. */ parent_exists = !make_path_private (dst_path, arg_in_concat - dst_path, @@ -35,8 +35,8 @@ #include "closeout.h" #include "error.h" #include "human.h" +#include "dirname.h" -char *dirname (); void strip_trailing_slashes (); char *xstrdup (); char *xgetcwd (); @@ -411,7 +411,7 @@ find_mount_point (const char *file, const struct stat *file_stat) char *dir; strip_trailing_slashes (tmp); - dir = dirname (tmp); + dir = dir_name (tmp); free (tmp); rv = chdir (dir); free (dir); diff --git a/src/install.c b/src/install.c index 98c196a43..888204d10 100644 --- a/src/install.c +++ b/src/install.c @@ -81,6 +81,7 @@ #include "path-concat.h" #include "cp-hash.h" #include "copy.h" +#include "dirname.h" #if HAVE_SYS_WAIT_H # include <sys/wait.h> @@ -127,7 +128,6 @@ gid_t getgid (); #endif char *base_name (); -char *dirname (); int full_write (); int isdir (); enum backup_type get_version (); @@ -411,7 +411,7 @@ install_file_to_path (const char *from, const char *to, char *dest_dir; int fail; - dest_dir = dirname (to); + dest_dir = dir_name (to); /* check to make sure this is a path (not install a b ) */ if (!STREQ (dest_dir, ".") @@ -30,6 +30,7 @@ #include "backupfile.h" #include "closeout.h" #include "error.h" +#include "dirname.h" int link (); /* Some systems don't declare this anywhere. */ @@ -58,7 +59,6 @@ int symlink (); while (0) char *base_name (); -char *dirname (); enum backup_type get_version (); int isdir (); int yesno (); @@ -131,8 +131,8 @@ same_name (const char *source, const char *dest) struct stat dest_dir_stats; char *source_dirname, *dest_dirname; - source_dirname = dirname (source); - dest_dirname = dirname (dest); + source_dirname = dir_name (source); + dest_dirname = dir_name (dest); if (source_dirname == NULL || dest_dirname == NULL) error (1, 0, _("virtual memory exhausted")); |