From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6bf9d4ba0cfd8cb6 X-Google-Attributes: gid103376,public From: "Tarjei T. Jensen" Subject: Re: [OT] C and in-band signalling (was: Re: Announce: OpenToken 2.0 released) Date: 2000/03/06 Message-ID: <89vss6$7u41@ftp.kvaerner.com>#1/1 X-Deja-AN: 593728566 Content-Transfer-Encoding: 7bit References: <3890C62B.18309585@telepath.com> <876unj$jcs$1@nnrp1.deja.com> <87d7qck6pm.fsf@deneb.cygnus.argh.org> <88iuk2$s6d3@ftp.kvaerner.com> <873dq5ntj5.fsf_-_@deneb.cygnus.argh.org> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Organization: Kv�rner Group IT Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-06T00:00:00+00:00 List-Id: Florian Weimer wrote >"Tarjei T. Jensen" writes: >> It is traditionally -1. If, on a platform where sizeof(int) == >> sizeof(char) there is a convention that characters are positive >> (assuming the sizeof(int) > 8) then a convention which use negative >> numbers for signalling would still work. > >No, for binary files, a conforming implementation has to be able to store >and retrieve all possible char type values, including the negative ones. You would have the same problem on a platform with a signed char type. As far as I know EOF should not be used with binary data. Those kind of data is best handled with read() and write() or a functional equivalent. Greetings,