CPP defines...

News reading a/c for rb rb at ist.CO.UK
Fri Mar 4 06:36:35 AEST 1988


Here's a nasty little script that comes in useful when you
want to know what your cpp *really* predefines: we have found
that the man page is sometimes economical with the truth.
Those of you without strings(1) and/or a separate /lib/cpp will
have to use your imagination.
--------------------------------------------------------------
#!/bin/sh
strings -a -2 /lib/cpp | sed '/^a-zA-Z0-9_/!s/.*/#ifdef &\
"%&"\
#endif/p' |/lib/cpp |sed -n '/%/s/[%"]//gp'



More information about the Comp.lang.c mailing list