Article View: comp.sys.amiga.tech
Article #13600Aztec C bug report: _toupper() and _tolower reversed
From: J. Gregory Noel
Date: Thu, 08 Feb 1990 17:14
Date: Thu, 08 Feb 1990 17:14
19 lines
997 bytes
997 bytes
BUG: The #defines in <ctype.h> for _toupper and _tolower are reversed
Try the attached program:
----------- cut here
#include <Aztec:include/stdio.h>
#include <Aztec:include/ctype.h>
main(void)
{
printf("This should print 'C': %c\n", _toupper('c'));
printf("This should print 'c': %c\n", _tolower('C'));
return 0;
}
----------- cut here
The bug also seems to infect (hmmmm, that was a typo for "affect" but it's
too good to remove) some of the library modules that might use _toupper() and
_tolower(); I get inconsistant results.
--
-- J. Gregory Noel, UNIX Guru greg@noel.cts.com or greg@noel.uucp
Technical Details
Message-ID:
<1686.AA1686@noel>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucsdhub!hp-sdd!ncr-sd!noel.cts.com!gregShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucsdhub!hp-sdd!ncr-sd!noel.cts.com!greg From: greg@noel.CTS.COM (J. Gregory Noel) Newsgroups: comp.sys.amiga.tech Subject: Aztec C bug report: _toupper() and _tolower reversed Message-ID: <1686.AA1686@noel> Date: 8 Feb 90 17:14:42 GMT Lines: 19