small fix
This commit is contained in:
parent
e9ed130ffd
commit
b323d17369
7
os/mem.c
7
os/mem.c
@ -259,7 +259,6 @@ Yap_open_buf_write_stream(char *buf, size_t nchars, encoding_t *encp, memBufSou
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
st->nsize = nchars;
|
st->nsize = nchars;
|
||||||
/* currently these streams are not seekable */
|
|
||||||
st->linepos = 0;
|
st->linepos = 0;
|
||||||
st->charcount = 0;
|
st->charcount = 0;
|
||||||
st->linecount = 1;
|
st->linecount = 1;
|
||||||
@ -324,9 +323,9 @@ Yap_MemExportStreamPtr( int sno )
|
|||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
#if MAY_WRITE
|
#if MAY_WRITE
|
||||||
if (fflush(GLOBAL_Stream[sno].file) == 0 &&
|
if (fflush(GLOBAL_Stream[sno].file) == 0)
|
||||||
(s = GLOBAL_Stream[sno].nbuf)) {
|
{
|
||||||
s[ftell(GLOBAL_Stream[sno].file)] = '\0';
|
s = GLOBAL_Stream[sno].nbuf;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user