From 4670e456a5cb3e7fbfbb47e067626328f8fc2627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Manuel=20de=20Morais=20Santos=20Costa?= Date: Tue, 12 Jan 2010 14:08:38 +0000 Subject: [PATCH] do not check for bom over binary files (obs from Nuno Fonseca). --- C/iopreds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/C/iopreds.c b/C/iopreds.c index 7e93e55bc..7449f0917 100755 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -2361,8 +2361,11 @@ p_open (void) } unix_upd_stream_info (st); if (opts != 0) { - if (opts & 2) + if (opts & 2) { st->status |= Binary_Stream_f; + /* we should not search for a byter order mark on a binary file */ + avoid_bom = TRUE; + } if (opts & 4) { if (st->status & (Tty_Stream_f|Socket_Stream_f|InMemory_Stream_f)) { Term ta[1], t;