Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site root44.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!mcvax!ukc!stc!root44!addw
From: addw@root44.UUCP (Alain Williams)
Newsgroups: net.bugs
Subject: Re: XENIX 3.0 toupper() and tolower() broken
Message-ID: <5452@root44.UUCP>
Date: Wed, 2-Oct-85 11:45:38 EDT
Article-I.D.: root44.5452
Posted: Wed Oct  2 11:45:38 1985
Date-Received: Sat, 5-Oct-85 07:23:47 EDT
Organization: Root Computers Ltd., London
Lines: 17
Xpath: stc stc-a

>> Seems that the XENIX 3.0 ctype.h has toupper() and tolower() defined as
>> macros like this,...
>> #define toupper(x) (ifsomething(x) ? dosomething(x) : (x))
>> which breaks badly if (x) is autoincrement or autodecrement. Ie.
>> toupper(s++) goes to (ifsomething(s++) ? donesomething(s++) : (s++)),
>> which is clearly wrong.

This is clearly right. When you are dealing with macros, you must always
expect this. The fact that it broke news software is a reflection on the
way news was written, not the XENIX macros.
-- 
	Alain Williams,
	Root Computers Ltd, London, England.
	!{hrc63|qmc-cs|edai|kcl-cs|ukc|glasgow|ist|jmccfr|west44
		ubu|rlvd|pmllab|stc}!root44!addw
	{unisoft|deccra}!root44!addw
	root44!{rootcl|rootis}!addw