fix \c in quoted strings

This commit is contained in:
Vitor Santos Costa 2014-08-06 20:02:28 -05:00
parent ef3a5754e6
commit 2aa8ad0fd3

View File

@ -294,8 +294,8 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
int ch; int ch;
/* escape sequence */ /* escape sequence */
ch = getchrq(inp_stream);
do_switch: do_switch:
ch = getchrq(inp_stream);
switch (ch) { switch (ch) {
case 10: case 10:
return 0; return 0;
@ -308,11 +308,11 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
case 'c': case 'c':
while (chtype((ch = getchrq(inp_stream))) == BS); while (chtype((ch = getchrq(inp_stream))) == BS);
{ {
int och = ch; if (ch == '\\') {
ch = getchrq(inp_stream); goto do_switch;
return och; }
return ch;
} }
goto do_switch;
case 'd': case 'd':
return 127; return 127;
case 'e': case 'e':