diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-16 06:06:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-16 06:06:50 +0000 |
commit | 34c77c62d876eae153056388e21c73a29964c400 (patch) | |
tree | 152491e491fe3e85b98696e2cce7737d5c031ed5 /usr.sbin/dvmrpd/parse.y | |
parent | 861a8179aab10b8d4a585f385b99ce455781c996 (diff) |
in the lex... even inside quotes, a \ followed by space or tab should
expand to space or tab, and a \ followed by newline should be ignored
(as a line continuation). compatible with the needs of hoststated
(which has the most strict quoted string requirements), and ifstated
(where one commonly does line continuations in strings).
pointed out by mpf, discussed with pyr
Diffstat (limited to 'usr.sbin/dvmrpd/parse.y')
-rw-r--r-- | usr.sbin/dvmrpd/parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y index 51ddb0dbc6e..595dd8f9dda 100644 --- a/usr.sbin/dvmrpd/parse.y +++ b/usr.sbin/dvmrpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.9 2007/10/13 16:35:20 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.10 2007/10/16 06:06:49 deraadt Exp $ */ /* * Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org> @@ -558,8 +558,10 @@ top: } else if (c == '\\') { if ((next = lgetc(quotec)) == EOF) return (0); - if (next == quotec) + if (next == quotec || c == ' ' || c == '\t') c = next; + else if (next == '\n') + continue; else lungetc(next); } else if (c == quotec) { |