diff --git a/C/iopreds.c b/C/iopreds.c index 0b4e53346..9f2c17bf6 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -740,7 +740,9 @@ static Int static Int p_read ( USES_REGS1 ) { /* '$read'(+Flag,?Term,?Module,?Vars,-Pos,-Err) */ - return do_read(NULL, 7 PASS_REGS); + IOSTREAM *Yap_Scurin(void); + + return do_read(Yap_Scurin(), 7 PASS_REGS); } extern int Yap_getInputStream(Int, IOSTREAM **); diff --git a/packages/PLStream/pl-yap.c b/packages/PLStream/pl-yap.c index 0f259b0b2..d3ce338b4 100755 --- a/packages/PLStream/pl-yap.c +++ b/packages/PLStream/pl-yap.c @@ -1121,6 +1121,12 @@ Yap_StreamPosition(IOSTREAM *st) return StreamPosition(st); } +IOSTREAM * +Yap_Scurin(void) +{ + return Scurin; +} + #if THREADS