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

View File

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