Do not push the output of stream-read-line into the string buffer

This commit is contained in:
Juan Jose Garcia Ripoll 2011-01-12 15:31:47 +01:00
parent 1c6cc2ed0e
commit ba597e6b90

View file

@ -1484,12 +1484,15 @@ do_read_delimited_list(int d, cl_object in, bool proper_list)
strm = stream_or_default_input(strm);
#ifdef ECL_CLOS_STREAMS
if (!ECL_ANSI_STREAM_P(strm)) {
token = funcall(2, @'gray::stream-read-line', strm);
if (!Null(VALUES(1))) {
c = EOF;
goto EOFCHK;
value0 = funcall(2, @'gray::stream-read-line', strm);
value1 = VALUES(1);
if (!Null(value1)) {
if (!Null(eof_errorp))
FEend_of_file(strm);
value0 = eof_value;
value1 = Ct;
}
return token;
goto OUTPUT;
}
#endif
token = si_get_buffer_string();
@ -1499,7 +1502,7 @@ do_read_delimited_list(int d, cl_object in, bool proper_list)
break;
ecl_string_push_extend(token, c);
} while(1);
EOFCHK: if (c == EOF && TOKEN_STRING_FILLP(token) == 0) {
if (c == EOF && TOKEN_STRING_FILLP(token) == 0) {
if (!Null(eof_errorp))
FEend_of_file(strm);
value0 = eof_value;
@ -1517,6 +1520,7 @@ EOFCHK: if (c == EOF && TOKEN_STRING_FILLP(token) == 0) {
value1 = (c == EOF? Ct : Cnil);
}
si_put_buffer_string(token);
OUTPUT:
@(return value0 value1)
@)