unifdef — Resolve and Remove ifdef’d Lines from C Program Source

Synopsis

/usr/ccs/bin/unifdef [-clt][-Dname][-Uname][-iDname][-iUname]... 
  [filename] 

Description

unifdef removes ifdef’d lines from a file while otherwise leaving the file alone. It is smart enough to deal with the nested ifdefs, comments, and the single and double quotes of C syntax, but it does not do any inclusion or interpretation of macros. Neither does it strip out comments, although it recognizes and ignores them. You specify which symbols you want defined with -D options and which you want undefined with -U options. Lines within those ifdefs are copied to the output or removed, as appropriate. Any ifdef, ifndef, else, and endif lines associated with file name are also ...

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.