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