core: read_char: Prepare for M2-Planet.

* src/posix.c (read_char): Prepare for M2-Planet.
This commit is contained in:
Jan Nieuwenhuizen 2019-10-24 21:26:24 +02:00
parent 242a26e0db
commit 57b2686a91
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 3 additions and 2 deletions

View File

@ -112,8 +112,9 @@ SCM
read_char (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));
SCM c = make_char (readchar ());
__stdin = fd;
return c;