what-defs.sh
来自「this is a mirrored site c-faq. thought 」· Shell 代码 · 共 32 行
SH
32 行
#!/bin/sh# what-defs: prints names of predefined cpp macros# tested on Sun3, Sun4, SGI, HP, Stellar, Convex, DECstation, Moto 1147# Apparently by Greg Roelofs, a.k.a "Cave Newt"# stupid, stupid Ultrix! I have a "which" function that I cannot use, because# the Ultrix /bin/sh does not understand shell functions! (try /bin/sh5!)# also, the Ultrix "test" command does not understand the -x flag!path="`echo $PATH | sed -e 's/:/ /g'`"cc=`for dir in $path ; do if [ -r $dir/cc ] ; then echo $dir/cc exit fidone`strings -a -2 /lib/cpp $cc |sed -e 's/^-D//' |sort -u |sed -n '/^[a-zA-Z_][a-zA-Z0-9_]*$/s//#ifdef &\"%&"\#endif/p' >/tmp/$$.ccc -E /tmp/$$.c |sed -n '/%/s/[%"]//gp'rm -f /tmp/$$.cexit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?