source: trunk/minix/man/man1/ifdef.1@ 20

Last change on this file since 20 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.3 KB
Line 
1.TH IFDEF 1
2.SH NAME
3ifdef \- 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
29allows conditional code [ #ifdef ... #endif ]
30to be selectively removed from C files, but at the same time leaving
31all other C preprocessor commands intact such as #define, #include etc.
32Input to
33.I ifdef
34is either the file named as the last argument, or \fIstdin\fR if no file
35is named.
36Output goes to \fIstdout\fR.
37.PP
38Symbols 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.
40It is not permitted to give values to symbols.
41Similarly, \fB\-U\fR undefines a symbol and ignores subsequent
42\fI#defines\fRs.
43Symbols defined with \fB\-I\fR are ignored; any \fI#ifdef\fR using an
44ignored symbol will be left intact.
Note: See TracBrowser for help on using the repository browser.