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

David Koblas koblas at mips.COM
Mon Apr 3 05:34:50 AEST 1989


In article <137 at titania.warwick.ac.uk> cudcv at 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


-- 
name : David Koblas                  uucp  : {ames,decwrl}!mips!koblas 
place: MIPS Computers Systems        domain: koblas at mips.com
quote: "It was never ment to be a game, NEVER." -- Rollerball



More information about the Comp.sources.bugs mailing list