Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!udel!mmdf From: 702WFG%SCRVMSYS.BITNET@cornellc.cit.cornell.edu (bill gunshannon) Newsgroups: comp.os.minix Subject: Re: Where is isascii(c)? Message-ID: <9936@nigel.udel.EDU> Date: 2 Feb 90 17:33:19 GMT Sender: mmdf@udel.EDU Lines: 19 >From: Christoph van Wuellen > > indeed is very messy. There is much code around which, e.g., >does tolower(x) without checking in advance if x is an upper case letter. >This is wrong on the machines I work on since the tolower macro just adds >'a'-'A'. I don't know if some versions of tolower do the check, but this >has lead to errors in the past. A quick galnce at my SYS V manual says: "The macro _tolower requires an uppercase letter as its argument; its result is the corresponding lowercase letter. Arguments outside the domain cause undefined results." I haven' read it specificly but I doubt that ANSI or POSIX have made any substantial change to this philosophy. I would say it is up to the programmer to make sure he only passes it valid data. After all, isn't that why we have "isupper()"?? :-) bill gunshannon 702WFG@SCRVMSYS.BITNET