Make the support for 0'\s and 0'\z conditional on the ISO escape sequences flag.
This commit is contained in:
parent
f83cdde766
commit
5c9d62e16e
@ -316,6 +316,9 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
|
|||||||
case 'r':
|
case 'r':
|
||||||
return '\r';
|
return '\r';
|
||||||
case 's': /* space */
|
case 's': /* space */
|
||||||
|
if (yap_flags[CHARACTER_ESCAPE_FLAG] == ISO_CHARACTER_ESCAPES) {
|
||||||
|
return send_error_message("invalid escape sequence \\s");
|
||||||
|
} else
|
||||||
return ' ';
|
return ' ';
|
||||||
case 't':
|
case 't':
|
||||||
return '\t';
|
return '\t';
|
||||||
@ -360,6 +363,9 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
|
|||||||
case 'v':
|
case 'v':
|
||||||
return '\v';
|
return '\v';
|
||||||
case 'z': /* Prolog end-of-file */
|
case 'z': /* Prolog end-of-file */
|
||||||
|
if (yap_flags[CHARACTER_ESCAPE_FLAG] == ISO_CHARACTER_ESCAPES) {
|
||||||
|
return send_error_message("invalid escape sequence \\z");
|
||||||
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
case '\\':
|
case '\\':
|
||||||
return '\\';
|
return '\\';
|
||||||
|
Reference in New Issue
Block a user