Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

diff(1)






       unifdef(1BSD)        (BSD System Compatibility)        unifdef(1BSD)


       NAME
             unifdef - (BSD) resolve and remove ifdef'ed lines from C
             program source

       SYNOPSIS
             /usr/ucb/unifdef [-clt] [-Dname] [-Uname] [-iDname]
                   [-iUname] . . . [file]

       DESCRIPTION
             unifdef removes ifdefed lines from a file while otherwise
             leaving the file alone.  It is smart enough to deal with the
             nested ifdefs, comments, single and double quotes of C syntax,
             but it does not do any including or interpretation of macros.
             Neither does it strip out comments, though 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 will be copied to the output, or
             removed, as appropriate.  Any ifdef, ifndef, else, and endif
             lines associated with file will also be removed.

             ifdefs involving symbols you do not specify are untouched and
             copied out along with their associated ifdef, else, and endif
             lines.

             If an ifdefX occurs nested inside another ifdefX, then the
             inside ifdef is treated as if it were an unrecognized symbol.
             If the same symbol appears in more than one argument, only the
             first occurrence is significant.

             unifdef copies its output to the standard output and will take
             its input from the standard input if no file argument is
             given.

             The following options are available:

             -c        Complement the normal operation.  Lines that would
                       have been removed or blanked are retained, and vice
                       versa.

             -l        Replace ``lines removed'' lines with blank lines.

             -t        Plain text option.  unifdef refrains from attempting
                       to recognize comments and single and double quotes.





                           Copyright 1994 Novell, Inc.               Page 1













      unifdef(1BSD)        (BSD System Compatibility)        unifdef(1BSD)


            -iDname   Ignore, but print out, lines associated with the
                      defined symbol name.  If you use ifdefs to delimit
                      non-C lines, such as comments or code which is under
                      construction, then you must tell unifdef which
                      symbols are used for that purpose so that it will
                      not try to parse for quotes and comments within
                      them.

            -iUname   Ignore, but print out, lines associated with the
                      undefined symbol name.

      REFERENCES
            cc(1), diff(1)

      DIAGNOSTICS
            Premature EOF       Inappropriate else or endif.

            Exit status is 0 if output is exact copy of input, 1 if not, 2
            if unifdef encounters problems.





























                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026