diff options
author | Mike Smith <msmith@FreeBSD.org> | 1999-01-10 05:08:12 +0000 |
---|---|---|
committer | Mike Smith <msmith@FreeBSD.org> | 1999-01-10 05:08:12 +0000 |
commit | e4329c99422f5bc02d2d75eff70a6ad600499480 (patch) | |
tree | fa72620d252fb5a7c31a7fe8dda205318176854b /sys/boot | |
parent | 16f81b74ae207aaea63621ffda92c74f85e5aa89 (diff) |
Notes
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/common/interp_backslash.c | 5 | ||||
-rw-r--r-- | sys/boot/common/interp_parse.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/sys/boot/common/interp_backslash.c b/sys/boot/common/interp_backslash.c index 8807fdaa9645..6de118ec63fc 100644 --- a/sys/boot/common/interp_backslash.c +++ b/sys/boot/common/interp_backslash.c @@ -11,7 +11,7 @@ * Jordan K. Hubbard * 29 August 1998 * - * $Id: interp_backslash.c,v 1.1 1998/09/01 00:41:24 msmith Exp $ + * $Id: interp_backslash.c,v 1.2 1998/09/03 06:14:41 jkh Exp $ * * Routine for doing backslash elimination. */ @@ -52,9 +52,10 @@ backslash(char *str) str++; break; - /* preserve backslashed quotes */ + /* preserve backslashed quotes, dollar signs */ case '\'': case '"': + case '$': new_str[i++] = '\\'; new_str[i++] = *str++; break; diff --git a/sys/boot/common/interp_parse.c b/sys/boot/common/interp_parse.c index ef235632bd66..a450f7d92dd8 100644 --- a/sys/boot/common/interp_parse.c +++ b/sys/boot/common/interp_parse.c @@ -11,7 +11,7 @@ * Jordan K. Hubbard * 29 August 1998 * - * $Id: interp_parse.c,v 1.3 1998/09/04 02:43:26 msmith Exp $ + * $Id: interp_parse.c,v 1.4 1998/09/17 23:52:02 msmith Exp $ * * The meat of the simple parser. */ @@ -100,7 +100,11 @@ parse(int *argc, char ***argv, char *str) while (*p) { switch (state) { case STR: - if (isquote(*p)) { + if ((*p == '\\') && p[1]) { + p++; + PARSE_FAIL(i == (PARSE_BUFSIZE - 1)); + buf[i] = *p++; + } else if (isquote(*p)) { quote = quote ? 0 : *p; ++p; } |