Use global applet_name instead of local versions.

This commit is contained in:
Matt Kraai
2000-07-12 15:38:49 +00:00
parent e714bce003
commit e58771e73c
20 changed files with 42 additions and 72 deletions

View File

@@ -40,7 +40,7 @@ extern int rmdir_main(int argc, char **argv)
while (--argc > 0) {
if (rmdir(*(++argv)) == -1) {
fprintf(stderr, "%s: %s\n", *argv, strerror(errno));
fprintf(stderr, "%s: %s\n", applet_name, strerror(errno));
exit(FALSE);
}
}

View File

@@ -183,7 +183,7 @@ test_main(int argc, char** argv)
{
int res;
if (strcmp(argv[0], "[") == 0) {
if (strcmp(applet_name, "[") == 0) {
if (strcmp(argv[--argc], "]"))
fatalError("missing ]\n");
argv[argc] = NULL;

View File

@@ -43,7 +43,7 @@ extern int whoami_main(int argc, char **argv)
puts(user);
exit(TRUE);
}
fprintf(stderr, "%s: cannot find username for UID %u\n", argv[0],
fprintf(stderr, "%s: cannot find username for UID %u\n", applet_name,
(unsigned) uid);
return(FALSE);
}