fix stream access.
This commit is contained in:
parent
7cb271fd58
commit
145b9c1b4a
15
C/iopreds.c
15
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
|
void
|
||||||
Yap_InitPlIO (void)
|
Yap_InitPlIO (void)
|
||||||
{
|
{
|
||||||
InitPlIO ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -320,8 +308,6 @@ typedef struct stream_ref
|
|||||||
struct io_stream *write;
|
struct io_stream *write;
|
||||||
} stream_ref;
|
} stream_ref;
|
||||||
|
|
||||||
extern stream_ref *PL_blob_data(Atom, void *, void *);
|
|
||||||
|
|
||||||
#ifdef BEAM
|
#ifdef BEAM
|
||||||
int beam_write (void)
|
int beam_write (void)
|
||||||
{
|
{
|
||||||
@ -1277,5 +1263,4 @@ Yap_InitIOPreds(void)
|
|||||||
Yap_InitCPred ("$float_format", 1, p_float_format, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
Yap_InitCPred ("$float_format", 1, p_float_format, SafePredFlag|SyncPredFlag|HiddenPredFlag);
|
||||||
Yap_InitCPred ("$has_readline", 0, p_has_readline, SafePredFlag|HiddenPredFlag);
|
Yap_InitCPred ("$has_readline", 0, p_has_readline, SafePredFlag|HiddenPredFlag);
|
||||||
|
|
||||||
InitPlIO ();
|
|
||||||
}
|
}
|
||||||
|
12
H/rheap.h
12
H/rheap.h
@ -924,18 +924,6 @@ RestoreDBErasedIList(void)
|
|||||||
static void
|
static void
|
||||||
RestoreStreams(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
|
static void
|
||||||
|
Reference in New Issue
Block a user