🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #2174

Re: sc 6.1 - Allow ANSI pre-processor and read-only strings

#2174
From: John Woods
Date: Mon, 03 Apr 1989 21:04
27 lines
1421 bytes
In article <16445@yoyodyne.mips.COM>, koblas@mips.COM (David Koblas) writes:
> In article <137@titania.warwick.ac.uk> cudcv@warwick.ac.uk (Rob McMahon) writes:
> >! #define ctl(x) ('x'&037)
> >--- 65,71 ----
> >! #define ctl(x) ((x)&037)
> 
> Instead of doing this change there is a much simpler solution, which
> of course allows you to not make such a huge change to existing code.
> 
> #ifdef __STDC___
> # define ctl(x)	(#x[0]&037)
> #else
> # define ctl(x) ('x'&037)
> #endif
> 
However, this solution does not handle the case of non-ANSI compilers which
do not have the undocumented Reiser CPP features.  The first solution is
correct for Classic C as documented in "The Old Testament" (K&R I), and for
all existing (correct) C compilers, Reiserish or not.



-- 
John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101
...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu

			Remainder Khomeini!
Technical Details
Message-ID: <1196@frog.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!pyramid!prls!philabs!linus!raybed2!rayssd!mirror!frog!john
References: <137@titania.warwick.ac.uk> <16445@yoyodyne.mips.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!pyramid!prls!philabs!linus!raybed2!rayssd!mirror!frog!john
From: john@frog.UUCP (John Woods)
Newsgroups: comp.sources.bugs
Subject: Re: sc 6.1 - Allow ANSI pre-processor and read-only strings
Message-ID: <1196@frog.UUCP>
Date: 3 Apr 89 21:04:00 GMT
References: <137@titania.warwick.ac.uk> <16445@yoyodyne.mips.COM>
Organization: Misanthropes-R-Us
Lines: 27