Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decvax.UUCP Path: utzoo!linus!decvax!minow From: minow@decvax.UUCP (Martin Minow) Newsgroups: net.lang.c Subject: toupper -- a lesson for programmers Message-ID: <277@decvax.UUCP> Date: Fri, 11-Nov-83 18:29:53 EST Article-I.D.: decvax.277 Posted: Fri Nov 11 18:29:53 1983 Date-Received: Sat, 12-Nov-83 21:03:10 EST Organization: DEC UNIX Engineering Group Lines: 17 The behavior of toupper() and tolower() varies across the many implementations of the C library. The following strategies are known to work: 1. if (isupper(c)) c = tolower(c); 2. #ifdef tolower #undef tolower #define tolower(c) (whatever you feel is right) Moral: if you do something wrong, half the people will adapt to it and the other half will "do it right." Martin Minow decvax!minow