Use base_name, not basename.

This commit is contained in:
Jim Meyering
1997-05-27 13:55:23 +00:00
parent dd547a84bf
commit e4f25ca7b1
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -33,8 +33,8 @@
#include "long-options.h"
#include "error.h"
extern char *basename ();
extern void strip_trailing_slashes ();
char *base_name ();
void strip_trailing_slashes ();
/* The name this program was run with. */
char *program_name;
@@ -104,7 +104,7 @@ main (int argc, char **argv)
strip_trailing_slashes (argv[1]);
name = basename (argv[1]);
name = base_name (argv[1]);
if (argc == 3)
remove_suffix (name, argv[2]);
+4 -4
View File
@@ -138,7 +138,7 @@ char *getusershell ();
void endusershell ();
void setusershell ();
char *basename ();
char *base_name ();
char *xmalloc ();
char *xrealloc ();
char *xstrdup ();
@@ -241,7 +241,7 @@ log_su (const struct passwd *pw, int successful)
if (tty == NULL)
tty = "none";
/* 4.2BSD openlog doesn't have the third parameter. */
openlog (basename (program_name), 0
openlog (base_name (program_name), 0
# ifdef LOG_AUTH
, LOG_AUTH
# endif
@@ -375,14 +375,14 @@ run_shell (const char *shell, const char *command, char **additional_args)
char *arg0;
char *shell_basename;
shell_basename = basename (shell);
shell_basename = base_name (shell);
arg0 = xmalloc (strlen (shell_basename) + 2);
arg0[0] = '-';
strcpy (arg0 + 1, shell_basename);
args[0] = arg0;
}
else
args[0] = basename (shell);
args[0] = base_name (shell);
if (fast_startup)
args[argno++] = "-f";
if (command)