🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Alain Williams Wed, 02 Oct 1985 15:45
Re: XENIX 3.0 toupper() and tolower() broken
#476
Author: Alain Williams
Date: Wed, 02 Oct 1985 15:45
17 lines
1336 bytes
>> 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.
	<UK-net>!{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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads