Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!hplabs!hplabsc!daemon From: daemon@hplabsc.UUCP Newsgroups: comp.mail.elm Subject: Bugfix for ELM Message-ID: <1758@hplabsc.HP.COM> Date: Thu, 7-May-87 22:22:26 EDT Article-I.D.: hplabsc.1758 Posted: Thu May 7 22:22:26 1987 Date-Received: Sat, 9-May-87 08:06:14 EDT Sender: daemon@hplabsc.HP.COM Reply-To: trwrb!trwspp!spp3!baur%sdcrdcf.UUCP@sdcsvax.ucsd.edu (Steven L. Baur) Organization: TRW Inc., Redondo Beach, CA Lines: 42 Approved: taylor@hplabs (with 'postmail') There is a bug in the new patched elm in the file input_utils.c The cause stems from use of the tolower macro in want_to. Certain brain damaged implementations of ctype.h define tolower as a macro that must *only* be called with upper case letters. BSD 4.2 is one of them. Here is how I fixed it: 21,33d20 < /* < Make up for Brain Damaged BSD tolower macro < */ < < Tolower(c) < { < if (isupper(c)) { < return tolower(c); < } else { < return c; < } < } < 46,47d32 < dprint(1, (debugfile, "\nwant-to: default='%c', echo=%d\n",dflt,echo_answer)); < 53c38 < ch = Tolower(ReadCh()); --- > ch = tolower(ReadCh()); 59,62d43 < < dprint(1, (debugfile, "\nwant-to: answer was '%c' (%x)\n", ch, ch)); < dprint(1, (debugfile, "want-to: returning '%c'\n", ch == '\n' || ch == '\r' ? dflt : ch)); < You don't need the dprint lines, I just stuck them in while trying to figure out how unmodified, once-working code had suddenly broken. Hope this helps someone. Steve -- -Steve Baur {ihnp4,decvax,ucbvax,hplabs}!trwrb!trwspp!spp3!baur People without college degrees are people too.