core: read_string: Prepare for M2-Planet.

* src/string.c (read_string): Prepare for M2-Planet.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2019-10-24 21:44:40 +02:00
parent c3e1eaf69a
commit 6f09fb9c1e
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 3 additions and 2 deletions

View File

@ -169,8 +169,9 @@ SCM
read_string (SCM port) /*:((arity . n)) */
{
int fd = __stdin;
if (TYPE (port) == TPAIR && TYPE (car (port)) == TNUMBER)
__stdin = VALUE (CAR (port));
if (TYPE (port) == TPAIR)
if (TYPE (car (port)) == TNUMBER)
__stdin = VALUE (CAR (port));
int c = readchar ();
size_t i = 0;
while (c != -1)