delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/02/03/05:10:30

Date: Tue, 3 Feb 1998 12:10:15 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
cc: DJ Delorie <dj AT delorie DOT com>, djgpp-workers AT delorie DOT com
Subject: Re: char != unsigned char... sometimes, sigh
In-Reply-To: <34D6C7DF.35AD@rug.ac.be>
Message-ID: <Pine.SUN.3.91.980203120818.21682a-100000@is>
MIME-Version: 1.0

On Tue, 3 Feb 1998, Vik Heyndrickx wrote:

> > No, because the problem is that EOF ((int)-1) and 0xff ((int)(signed
> > char)-1) ARE THE SAME NUMBER.  No amount of logic can tell the
> > difference.
> 
> This sort of difficulties is triggered by "choices made in the past",
> where it was more efficient to return an error code at the same place
> where the normal return value would be returned.

Sorry, you lost me.  Where was a ``normal return value'' replaced by an 
error code, and how does this relate to EOF (which is -1 on every 
platform I saw).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019