version 1.9, 2002/12/02 07:16:23 |
version 1.10, 2002/12/02 07:18:50 |
|
|
.Dt UNIFDEF 1 |
.Dt UNIFDEF 1 |
.Os |
.Os |
.Sh NAME |
.Sh NAME |
.Nm unifdef , unifdefall |
.Nm unifdef |
.Nd remove preprocessor conditionals from code |
.Nd remove preprocessor conditionals from code |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm |
.Nm |
|
|
.Oc |
.Oc |
.Ar ... |
.Ar ... |
.Op Ar file |
.Op Ar file |
.Nm unifdefall |
|
.Op Fl I Ns Ar path |
|
.Ar ... |
|
.Ar file |
|
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
.Nm |
.Nm |
|
|
it will not complain if it gets |
it will not complain if it gets |
to the end of a line and finds no backslash for continuation. |
to the end of a line and finds no backslash for continuation. |
.Pp |
.Pp |
A script called |
|
.Nm unifdefall |
|
can be used to remove all conditional |
|
.Xr cpp 1 |
|
directives from a file. |
|
It uses |
|
.Nm Fl s |
|
and |
|
.Nm cpp Fl dM |
|
to get lists of all the controlling symbols |
|
and their definitions (or lack thereof), |
|
then invokes |
|
.Nm |
|
with appropriate arguments to process the file. |
|
.Pp |
|
Available options: |
Available options: |
.Bl -tag -width indent -compact |
.Bl -tag -width indent -compact |
.It Fl D Ns Ar sym |
.It Fl D Ns Ar sym |
|
|
and |
and |
.Fl U Ns Ar sym |
.Fl U Ns Ar sym |
above. |
above. |
.Pp |
|
.It Fl I Ns Ar path |
|
Specifies to |
|
.Nm unifdefall |
|
an additional place to look for |
|
.Ic #include |
|
files. |
|
This option is ignored by |
|
.Nm |
|
for compatibility with |
|
.Xr cpp 1 |
|
and to simplify the implementation of |
|
.Nm unifdefall . |
|
.El |
.El |
.Pp |
.Pp |
The |
The |