fix \c in quoted strings
This commit is contained in:
parent
ef3a5754e6
commit
2aa8ad0fd3
10
C/scanner.c
10
C/scanner.c
@ -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':
|
||||||
|
Reference in New Issue
Block a user