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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Florian Weimer Subject: [OT] C and in-band signalling (was: Re: Announce: OpenToken 2.0 released) Date: 2000/03/05 Message-ID: <873dq5ntj5.fsf_-_@deneb.cygnus.argh.org>#1/1 X-Deja-AN: 593506552 References: <3890C62B.18309585@telepath.com> <876unj$jcs$1@nnrp1.deja.com> <87d7qck6pm.fsf@deneb.cygnus.argh.org> <88iuk2$s6d3@ftp.kvaerner.com> Mail-Copies-To: never Supersedes: <877lfhntn1.fsf_-_@deneb.cygnus.argh.org> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.argh.org X-Trace: deneb.cygnus.argh.org 952282046 21167 192.168.1.2 (5 Mar 2000 18:47:26 GMT) Organization: Penguin on board Mime-Version: 1.0 User-Agent: Gnus/5.0804 (Gnus v5.8.4) Emacs/20.4 Reply-To: Florian Weimer NNTP-Posting-Date: 5 Mar 2000 18:47:26 GMT Newsgroups: comp.lang.ada Date: 2000-03-05T18:47:26+00:00 List-Id: "Tarjei T. Jensen" writes: > Hyman Rosen wrote > >(I know that > >the number of platforms where sizeof(int) == sizeof(char) is non-zero, > >but do those platforms have 32-bit input from external sources?) > > Is that a problem on any plattform? EOF is not a fixed value. Yes, it is a preprocessor macro "which expands to an integer constant expression, with type int and a negative value". > 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.