diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c index d77d9d3..08ad0f4 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -119,9 +119,7 @@ enum { NOPTS = ARRAY_SIZE(optletters_optnames) }; /* ============ Misc data */ -static const char homestr[] ALIGN1 = "HOME"; -static const char snlfmt[] ALIGN1 = "%s\n"; -static const char msg_illnum[] ALIGN1 = "Illegal number: %s"; +#define msg_illnum "Illegal number: %s" /* * We enclose jmp_buf in a structure so that we can declare pointers to @@ -2520,7 +2518,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) flags = cdopt(); dest = *argptr; if (!dest) - dest = bltinlookup(homestr); + dest = bltinlookup("HOME"); else if (LONE_DASH(dest)) { dest = bltinlookup("OLDPWD"); flags |= CD_PRINT; @@ -2567,7 +2565,7 @@ cdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) /* NOTREACHED */ out: if (flags & CD_PRINT) - out1fmt(snlfmt, curdir); + out1fmt("%s\n", curdir); return 0; } @@ -2583,7 +2581,7 @@ pwdcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) setpwd(dir, 0); dir = physdir; } - out1fmt(snlfmt, dir); + out1fmt("%s\n", dir); return 0; } @@ -5625,7 +5623,7 @@ exptilde(char *startp, char *p, int flags) done: *p = '\0'; if (*name == '\0') { - home = lookupvar(homestr); + home = lookupvar("HOME"); } else { pw = getpwnam(name); if (pw == NULL) @@ -9857,7 +9855,7 @@ chkmail(void) } if (!mail_var_path_changed && statb.st_mtime != *mtp) { fprintf( - stderr, snlfmt, + stderr, "%s\n", pathopt ? pathopt : "you have mail" ); } |