mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 06:12:25 -08:00
Do not push the output of stream-read-line into the string buffer
This commit is contained in:
parent
1c6cc2ed0e
commit
ba597e6b90
1 changed files with 10 additions and 6 deletions
16
src/c/read.d
16
src/c/read.d
|
|
@ -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)
|
||||
@)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue