Do not strip CTL* escapes from redirection filenames in exptilde(),

expari(), expbackq() and evalvar(). Similar to revision 1.39.
Patch from Tor Egge.

PR:		45349
MFC after:	2 weeks
This commit is contained in:
Tim J. Robbins 2003-01-08 10:50:08 +00:00
parent 9cad88634f
commit 9c92e72c7f

View File

@ -278,7 +278,7 @@ exptilde(char *p, int flag)
char c, *startp = p; char c, *startp = p;
struct passwd *pw; struct passwd *pw;
char *home; char *home;
int quotes = flag & (EXP_FULL | EXP_CASE); int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR);
while ((c = *p) != '\0') { while ((c = *p) != '\0') {
switch(c) { switch(c) {
@ -369,7 +369,7 @@ expari(int flag)
char *p, *start; char *p, *start;
int result; int result;
int begoff; int begoff;
int quotes = flag & (EXP_FULL | EXP_CASE); int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR);
int quoted; int quoted;
@ -436,7 +436,7 @@ expbackq(union node *cmd, int quoted, int flag)
int startloc = dest - stackblock(); int startloc = dest - stackblock();
char const *syntax = quoted? DQSYNTAX : BASESYNTAX; char const *syntax = quoted? DQSYNTAX : BASESYNTAX;
int saveherefd; int saveherefd;
int quotes = flag & (EXP_FULL | EXP_CASE); int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR);
INTOFF; INTOFF;
saveifs = ifsfirst; saveifs = ifsfirst;
@ -635,7 +635,7 @@ evalvar(char *p, int flag)
int startloc; int startloc;
int varlen; int varlen;
int easy; int easy;
int quotes = flag & (EXP_FULL | EXP_CASE); int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR);
varflags = *p++; varflags = *p++;
subtype = varflags & VSTYPE; subtype = varflags & VSTYPE;