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