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: Keith Thompson Subject: Re: [OT] C and in-band signalling (was: Re: Announce: OpenToken 2.0 released) Date: 2000/03/06 Message-ID: #1/1 X-Deja-AN: 593943836 Sender: kst@king.cts.com 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> <89vss6$7u41@ftp.kvaerner.com> X-Trace: thoth.cts.com 952373595 64086 198.68.168.21 (6 Mar 2000 20:13:15 GMT) Organization: CTS Network Services Newsgroups: comp.lang.ada X-Complaints-To: newsmaster@cts.com Date: 2000-03-06T00:00:00+00:00 List-Id: "Tarjei T. Jensen" writes: [...] > 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. The C input routines are defined in terms of getc(), which returns the next byte as an *unsigned* char converted to int. As long as int is big enough to hold all possible unsigned char values, plus EOF (which is typically -1), you can safely use EOF with binary data. Yes, this is *way* off-topic. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Welcome to the last year of the 20th century.