Make the support for 0'\s and 0'\z conditional on the ISO escape sequences flag.

This commit is contained in:
Paulo Moura 2011-04-30 19:51:40 +02:00
parent f83cdde766
commit 5c9d62e16e
1 changed files with 8 additions and 2 deletions

View File

@ -316,6 +316,9 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
case 'r':
return '\r';
case 's': /* space */
if (yap_flags[CHARACTER_ESCAPE_FLAG] == ISO_CHARACTER_ESCAPES) {
return send_error_message("invalid escape sequence \\s");
} else
return ' ';
case 't':
return '\t';
@ -360,6 +363,9 @@ read_quoted_char(int *scan_nextp, IOSTREAM *inp_stream)
case 'v':
return '\v';
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;
case '\\':
return '\\';