www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/04/16:25:49

From: poletti AT my-dejanews DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Its me Please ...
Date: Tue, 04 Aug 1998 17:03:48 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 20
Message-ID: <6q7etm$v1p$1@nnrp1.dejanews.com>
References: <01bdbe08$aeac86c0$LocalHost AT default>
NNTP-Posting-Host: 194.185.219.21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <01bdbe08$aeac86c0$LocalHost AT default>,
  "Xee'Gh" <pekkaka AT dlc DOT fi> wrote:
> [...]
> char *wbuf, *wptr, c, l;
> [...]
>       c = fgetc(fh);
>       if (c > 191)                /* This is the error point */ <77>
> [...]

You only need to change c declaration from char to int. Char is a signed
one-byte long type, so it is allowed to go from -128 to 127 and this is the
reason why 191 will always be greater than it. You should find in fgetc
documentation that output type is int.

Bye,

  Flavio.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

- Raw text -


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