core: current_input_port: Prepare for M2-Planet.
* src/posix.c (current_input_port): Prepare for M2-Planet.
This commit is contained in:
parent
752c5f7d1b
commit
285d04043f
|
@ -197,8 +197,12 @@ current_input_port ()
|
|||
if (__stdin >= 0)
|
||||
return make_number (__stdin);
|
||||
SCM x = g_ports;
|
||||
while (x && PORT (CAR (x)) != __stdin)
|
||||
x = CDR (x);
|
||||
while (x)
|
||||
{
|
||||
if (PORT (CAR (x)) == __stdin)
|
||||
return CAR (x);
|
||||
x = CDR (x);
|
||||
}
|
||||
return CAR (x);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue