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)
|
if (__stdin >= 0)
|
||||||
return make_number (__stdin);
|
return make_number (__stdin);
|
||||||
SCM x = g_ports;
|
SCM x = g_ports;
|
||||||
while (x && PORT (CAR (x)) != __stdin)
|
while (x)
|
||||||
x = CDR (x);
|
{
|
||||||
|
if (PORT (CAR (x)) == __stdin)
|
||||||
|
return CAR (x);
|
||||||
|
x = CDR (x);
|
||||||
|
}
|
||||||
return CAR (x);
|
return CAR (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue