/* 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
#endif
char *xmalloc ();
-char *basename ();
+char *base_name ();
char *strndup();
enum Shell_syntax
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;
* BITSPERBYTE - 1)))))
#endif
-char *basename ();
+char *base_name ();
char *stpcpy ();
char *xmalloc ();
int safe_read ();
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);
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); \
} \
while (0)
-char *basename ();
+char *base_name ();
char *dirname ();
enum backup_type get_version ();
int isdir ();
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.
/* 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))
uid_t geteuid ();
#endif
-char *basename ();
+char *base_name ();
enum backup_type get_version ();
int isdir ();
int yesno ();
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"));
ino_t inum;
};
-char *basename ();
+char *base_name ();
char *stpcpy ();
char *xmalloc ();
char *xrealloc ();
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')))