fix restore of streams.

This commit is contained in:
ubu32 2011-07-11 21:15:15 -07:00
parent 4a13735cb0
commit 2a51403518

View File

@ -329,11 +329,14 @@ initIO()
int i; int i;
#ifdef __YAP_PROLOG__ #ifdef __YAP_PROLOG__
IOFUNCTIONS buf; volatile IOFUNCTIONS buf;
buf = GD->os.iofunctions; buf = *Sinput->functions;
memset(GD, 0, sizeof(gds_t)); memset(GD, 0, sizeof(gds_t));
GD->os.iofunctions = buf;
memset(LD, 0, sizeof(PL_local_data_t)); memset(LD, 0, sizeof(PL_local_data_t));
GD->os.iofunctions = buf;
Sinput->functions = &GD->os.iofunctions;
Soutput->functions = &GD->os.iofunctions;
Serror->functions = &GD->os.iofunctions;
#endif #endif
streamAliases = newHTable(16); streamAliases = newHTable(16);
streamContext = newHTable(16); streamContext = newHTable(16);