diff options
author | cracauer <cracauer@FreeBSD.org> | 1999-12-16 12:03:46 +0000 |
---|---|---|
committer | cracauer <cracauer@FreeBSD.org> | 1999-12-16 12:03:46 +0000 |
commit | a6c2f2ad3ba07fda28138ea19abe8a12158fbb37 (patch) | |
tree | 83122a507b0894b1af93f86f964539c2474bf7f6 /bin/sh | |
parent | e9b545322a9abb651e2eca82d74259e7a1afdea1 (diff) | |
download | FreeBSD-src-a6c2f2ad3ba07fda28138ea19abe8a12158fbb37.zip FreeBSD-src-a6c2f2ad3ba07fda28138ea19abe8a12158fbb37.tar.gz |
Second part of 8-bit fixes.
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/parser.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/sh/parser.c b/bin/sh/parser.c index d734066..3b93bd9 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -868,6 +868,7 @@ readtoken1(firstc, syntax, eofmark, striptabs) int parenlevel; /* levels of parens in arithmetic */ int oldstyle; char const *prevsyntax; /* syntax before arithmetic */ + int synentry; #if __GNUC__ /* Avoid longjmp clobbering */ (void) &out; @@ -879,6 +880,7 @@ readtoken1(firstc, syntax, eofmark, striptabs) (void) &oldstyle; (void) &prevsyntax; (void) &syntax; + (void) &synentry; #endif startlinno = plinno; @@ -906,7 +908,13 @@ readtoken1(firstc, syntax, eofmark, striptabs) CHECKEND(); /* set c to PEOF if at end of here document */ for (;;) { /* until end of line or end of word */ CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */ - switch(syntax[c]) { + + if (c < 0 && c != PEOF) + synentry = CWORD; + else + synentry = syntax[c]; + + switch(synentry) { case CNL: /* '\n' */ if (syntax == BASESYNTAX) goto endword; /* exit outer loop */ |