delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/22/09:06:31

From: mcr AT solidum DOT com (Michael Richardson)
Subject: Re: some unusual errors
22 Sep 1998 09:06:31 -0700 :
Message-ID: <199809211655.MAA13243.cygnus.gnu-win32@venus.solidum.com>
References: <3603E268 DOT 3CE39511 AT crocodial DOT de>
To: Benjamin Riefenstahl <benny AT crocodial DOT de>
Cc: gnu-win32 AT cygnus DOT com

>>>>> "Benjamin" == Benjamin Riefenstahl <benny AT crocodial DOT de> writes:
    Benjamin> a) Specification: The <ctype.h> functions all take "int"s in the range 0
    Benjamin> to UCHAR_MAX plus EOF. This is the same range that getc() returns. It is
    Benjamin> *not* the same range as "char", but OTOH "unsigned char" is a subset of
    Benjamin> this range, so with regular strings one usually should cast like this

    Benjamin>         for(s = s00; isspace((unsigned char)*s); s++)

    Benjamin> b) The <ctype.h> functions are usually implemented as macros which look
    Benjamin> up the answers in a static array. I think what the compiler complains
    Benjamin> about is, that you use a (signed) "char" to index into an array
  
  Then the routines should cast the argument appropriately, or the routines
should be functions and cast things appropriate, or "char" should be by
default unsigned.

   :!mcr!:            |  Solidum Systems Corporation, http://www.solidum.com
   Michael Richardson |For a better connected world,where data flows faster<tm>
 Personal: <A HREF="http://www.sandelman.ottawa.on.ca/People/Michael_Richardson/Bio.html">mcr AT sandelman DOT ottawa DOT on DOT ca</A>. PGP key available.
 Corporate: <A HREF="mailto:mcr AT solidum DOT com">mcr AT solidum DOT com</A>. 



  
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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