Rev | Line | |
---|
[9] | 1 | .TH IFDEF 1
|
---|
| 2 | .SH NAME
|
---|
| 3 | ifdef \- remove #ifdefs from a file
|
---|
| 4 | .SH SYNOPSIS
|
---|
| 5 | \fBifdef \fR[\fB\-t\fR] [\fB\-d\fIsymbol\fR] [\fB\-D\fIsymbol\fR] [\fB\-U\fIsymbol\fR] [\fB\-I\fIsymbol\fR] [file]\fR
|
---|
| 6 | .br
|
---|
| 7 | .de FL
|
---|
| 8 | .TP
|
---|
| 9 | \\fB\\$1\\fR
|
---|
| 10 | \\$2
|
---|
| 11 | ..
|
---|
| 12 | .de EX
|
---|
| 13 | .TP 20
|
---|
| 14 | \\fB\\$1\\fR
|
---|
| 15 | # \\$2
|
---|
| 16 | ..
|
---|
| 17 | .SH OPTIONS
|
---|
| 18 | .FL "\-D" "Define symbol permanently"
|
---|
| 19 | .FL "\-I" "Ignore symbol"
|
---|
| 20 | .FL "\-U" "Undefine symbol permanently"
|
---|
| 21 | .FL "\-d" "Define symbol. It may be #undef'ed later"
|
---|
| 22 | .FL "\-t" "Produce a table of the symbols on \fIstdout\fR"
|
---|
| 23 | .SH EXAMPLES
|
---|
| 24 | .EX "ifdef \-DUNIX file.c >newfile.c" "Define \fIUNIX\fR"
|
---|
| 25 | .EX "ifdef \-D_MINIX \-UDOS <x.c >y.c "Define \fI_MINIX\fR, undefine \fIDOS\fR"
|
---|
| 26 | .SH DESCRIPTION
|
---|
| 27 | .PP
|
---|
| 28 | \fIIfdef\fR
|
---|
| 29 | allows conditional code [ #ifdef ... #endif ]
|
---|
| 30 | to be selectively removed from C files, but at the same time leaving
|
---|
| 31 | all other C preprocessor commands intact such as #define, #include etc.
|
---|
| 32 | Input to
|
---|
| 33 | .I ifdef
|
---|
| 34 | is either the file named as the last argument, or \fIstdin\fR if no file
|
---|
| 35 | is named.
|
---|
| 36 | Output goes to \fIstdout\fR.
|
---|
| 37 | .PP
|
---|
| 38 | Symbols may be defined with the \fB\-d\fR or \fB\-D\fR flags just like
|
---|
| 39 | \fIcpp\fR, except that the latter option ignores subsequent \fI#undefs\fR.
|
---|
| 40 | It is not permitted to give values to symbols.
|
---|
| 41 | Similarly, \fB\-U\fR undefines a symbol and ignores subsequent
|
---|
| 42 | \fI#defines\fRs.
|
---|
| 43 | Symbols defined with \fB\-I\fR are ignored; any \fI#ifdef\fR using an
|
---|
| 44 | ignored symbol will be left intact.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.