Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > Can someone explain why this fixes the problem.
> 
> Think about a machine where char is signed by default.  Extracting \254
> into an int will produce -2, which will not equal \254 returned by getc.

Oh, I thought that the int returned by getc already had that sign
extension, but now I remember it doesn't.  In fact, it specifically
returns an int so -1 can be identified.  Got it.  Seems I am forgetting
some of my C.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to