www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/12/18/02:56:57

Sender: vheyndri AT rug DOT ac DOT be
Message-Id: <3498D668.3B38@rug.ac.be>
Date: Thu, 18 Dec 1997 08:53:12 +0100
From: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
Mime-Version: 1.0
To: molnarl AT cdata DOT tvnet DOT hu
Cc: djgpp-workers AT delorie DOT com
Subject: Re: char != unsigned char... sometimes, sigh
References: <Pine DOT SOL DOT 3 DOT 95 DOT 971217133116 DOT 1311B-100000 AT dumballah DOT tvnet DOT hu>

molnarl AT cdata DOT tvnet DOT hu wrote:
> 
> On Wed, 17 Dec 1997, Vik Heyndrickx wrote:
> 
> > int a ='\x84';
> > int b;
> 
> What's wrong with "int a=0x84;" ? :-)

In DOS codepage 850, 0x84 is an e-character with an accent on it, but
since I do not now how that shows on your mail reader, I prefer to write
to write '\x84'. But this was not the issue.

> > Since getc is only supposed to be used for text files, I think we should
> > change it to return chars in the range [-128..127], so that comparisons
> > work.
> 
> I think this is a bad idea, because most programs assume that EOF is -1.

I meant 'return ints in the range [-128..127] or -1'. Do I always have
to be *this* exact? I think it was obvious what I meant to say.

Kind regards.

-- 
 \ Vik /-_-_-_-_-_-_/   
  \___/ Heyndrickx /          
   \ /-_-_-_-_-_-_/

- Raw text -


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