input strings contained no uppercase letters. This is not the case.
The procedure `toupper' is guaranteed to work on all characters iff
the implementation is ANSI compliant. The procedure `_toupper' (ant
`toupper' in non-ANSI implementations) is guaranteed to work _only_ on
lowercase letters.
/* -*-C-*-
-$Id: primutl.c,v 9.63 1993/08/03 22:26:15 gjr Exp $
+$Id: primutl.c,v 9.64 1993/08/04 22:21:35 cph Exp $
Copyright (c) 1988-1993 Massachusetts Institute of Technology
{
fast int c1 = (*s1++);
fast int c2 = (*s2++);
- c1 = (_toupper (c1));
- c2 = (_toupper (c2));
+ if (islower (c1)) c1 = (_toupper (c1));
+ if (islower (c2)) c2 = (_toupper (c2));
diff = (c1 - c2);
if (diff != 0)
return ((diff > 0) ? 1 : -1);