me streams are now OS streams.

This commit is contained in:
Vítor Santos Costa 2015-10-05 10:30:47 +01:00
parent 9a962805ca
commit 784a058b04

View File

@ -1,3 +1,4 @@
/*************************************************************************
* *
* YAP Prolog *
@ -1263,9 +1264,8 @@ Yap_TermToString(Term t, char *s, size_t sz, size_t *length, encoding_t encp, i
if (encp)
GLOBAL_Stream[sno].encoding = encp;
Yap_plwrite (t, GLOBAL_Stream+sno, 0, flags, 1200);
s[GLOBAL_Stream[sno].u.mem_string.pos] = '\0';
GLOBAL_Stream[sno].status = Free_Stream_f;
UNLOCK(GLOBAL_Stream[sno].streamlock);
s = Yap_MemExportStreamPtr( sno );
Yap_CloseStream( sno );
LOCAL_c_output_stream = old_output_stream;
if ( EX == 0 ) return s;
return NULL;