From 46f6a0808793aa4bcc34d0ec30c5eb8182e9c9b9 Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 17 Aug 2005 02:27:39 +0000 Subject: [PATCH] Allow put_byte and get_byte on text streams by default. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1362 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/iopreds.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C/iopreds.c b/C/iopreds.c index 90a7247bb..1117d5ef6 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -3436,7 +3436,8 @@ p_get_byte (void) if (sno < 0) return(FALSE); status = Stream[sno].status; - if (!(status & Binary_Stream_f)) { + if (!(status & Binary_Stream_f) && + yap_flags[STRICT_ISO_FLAG]) { Yap_Error(PERMISSION_ERROR_INPUT_TEXT_STREAM, ARG1, "get_byte/2"); return(FALSE); } @@ -3471,7 +3472,8 @@ p_put_byte (void) int sno = CheckStream (ARG1, Output_Stream_f, "put/2"); if (sno < 0) return (FALSE); - if (!(Stream[sno].status & Binary_Stream_f)) { + if (!(Stream[sno].status & Binary_Stream_f) && + yap_flags[STRICT_ISO_FLAG]) { Yap_Error(PERMISSION_ERROR_OUTPUT_TEXT_STREAM, ARG1, "get0/2"); return(FALSE); }