unifdef man page on Ultrix

Man page or keyword search:  
man Server   3690 pages
apropos Keyword Search (all sections)
Output format
Ultrix logo
[printable version]

unifdef(1)			  Unsupported			    unifdef(1)

Name
       unifdef - removes ifdef'ed lines

Syntax
       unifdef [ -c -Dsym -idsym -iusym -l -t -Usym ] ...  [ file ]

Description
       The  command  is	 useful	 for removing ifdef'ed lines from a file while
       otherwise leaving the file alone.  The command is like a	 stripped-down
       C preprocessor: it is smart enough to deal with the nested ifdefs, com‐
       ments, single and double quotes of C syntax so that it can do its  job,
       but  it	doesn't do any including or interpretation of macros.  Neither
       does it strip out comments, though  it  recognizes  and	ignores	 them.
       Ifdefs involving symbols you don't specify are untouched and copied out
       along with their associated ifdef, else, and endif lines.   The	ifdef,
       ifndef,	else,  and  endif  lines associated with the symbol, sym, will
       also be removed.	 If an ifdef X occurs nested inside another  ifdef  X,
       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.

       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 won't try to parse for quotes and
       comments in those ifdef'ed lines.

       The command copies its output to stdout and will take  its  input  from
       stdin if no file argument is given.

Options
       -c	 Causes	 the  operation of to be complemented.	The lines that
		 would have been removed or  blanked  are  retained  and  vice
		 versa.

       -idsym	 Specifies that you want the lines inside certain ifdefs to be
		 ignored, but copied out.

       -iusym	 Specifies that you want the lines inside certain ifdefs to be
		 ignored, but copied out.

       -l	 Causes	 to  replace removed lines with blank lines instead of
		 deleting them.

       -t	 Makes refrain from attempting to recognize comments and  sin‐
		 gle  and double quotes.  This option is for use on plain text
		 (not C code).

       -Dsym	 Specifies which symbols you want defined and the lines inside
		 those ifdefs will be copied to the output.

       -Usym	 Specifies  which  symbols  you	 want  undefined and the lines
		 inside those ifdefs will be removed.

Restrictions
       Does not know how to deal with cpp constructs such as

	    #if	 defined(X) || defined(Y)

Diagnostics
       Premature EOF, inappropriate else or endif.

       Exit status is 0 if output is exact copy of input, 1 if not, 2 if trou‐
       ble.

See Also
       diff(1)

								    unifdef(1)
[top]

List of man pages available for Ultrix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net