From 145b9c1b4a79996cb65ee31744dd940e299ea6a3 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 15 Feb 2011 22:22:10 +0000 Subject: [PATCH] fix stream access. --- C/iopreds.c | 15 --------------- H/rheap.h | 12 ------------ 2 files changed, 27 deletions(-) diff --git a/C/iopreds.c b/C/iopreds.c index a77009d82..eab0b40b6 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -107,21 +107,9 @@ Yap_InitStdStreams (void) { } -static void -InitPlIO (void) -{ - Int i; - - for (i = 0; i < MaxStreams; ++i) { - INIT_LOCK(Stream[i].streamlock); - Stream[i].status = Free_Stream_f; - } -} - void Yap_InitPlIO (void) { - InitPlIO (); } /* @@ -320,8 +308,6 @@ typedef struct stream_ref struct io_stream *write; } stream_ref; -extern stream_ref *PL_blob_data(Atom, void *, void *); - #ifdef BEAM int beam_write (void) { @@ -1277,5 +1263,4 @@ Yap_InitIOPreds(void) Yap_InitCPred ("$float_format", 1, p_float_format, SafePredFlag|SyncPredFlag|HiddenPredFlag); Yap_InitCPred ("$has_readline", 0, p_has_readline, SafePredFlag|HiddenPredFlag); - InitPlIO (); } diff --git a/H/rheap.h b/H/rheap.h index 7115b4583..c2bbf1323 100755 --- a/H/rheap.h +++ b/H/rheap.h @@ -924,18 +924,6 @@ RestoreDBErasedIList(void) static void RestoreStreams(void) { - if (Yap_heap_regs->yap_streams != NULL) { - int sno; - - Yap_heap_regs->yap_streams = - (struct stream_desc *)AddrAdjust((ADDR)Yap_heap_regs->yap_streams); - for (sno = 0; sno < MaxStreams; ++sno) { - if (Stream[sno].status & Free_Stream_f) - continue; - Stream[sno].u.file.user_name = AtomTermAdjust(Stream[sno].u.file.user_name); - Stream[sno].u.file.name = AtomAdjust(Stream[sno].u.file.name); - } - } } static void