Skip to content
Browse files

unifdef.1: alphabetize options; better phrasing and concision.

  • Loading branch information...
1 parent 8ab6d1a commit d830a983be8bcc03f66d405b9b2095c508e16a15 @fanf2 committed
Showing with 39 additions and 59 deletions.
  1. +39 −59 unifdef.1
View
98 unifdef.1
@@ -183,6 +183,18 @@ Specify that a symbol is undefined.
If the same symbol appears in more than one argument,
the last occurrence dominates.
.Pp
+.It Fl iD Ns Ar sym Ns Op = Ns Ar val
+.It Fl iU Ns Ar sym
+C strings, comments,
+and line continuations
+are ignored within
+.Ic #ifdef
+and
+.Ic #ifndef
+blocks
+controlled by symbols
+specified with these options.
+.Pp
.It Fl b
Replace removed lines with blank lines
instead of deleting them.
@@ -197,35 +209,36 @@ Mutually exclusive with the
option.
.Pp
.It Fl c
-If the
-.Fl c
-flag is specified,
-then the operation of
-.Nm
-is complemented,
-i.e., the lines that would have been removed or blanked
+Complement,
+i.e., lines that would have been removed or blanked
are retained and vice versa.
.Pp
.It Fl d
Turn on printing of debugging messages.
.Pp
.It Fl e
-Because
-.Nm
-processes its input one line at a time,
-it cannot remove preprocessor directives that span more than one line.
-The most common example of this is a directive with a multi-line
-comment hanging off its right hand end.
By default,
-if
.Nm
-has to process such a directive,
-it will complain that the line is too obfuscated.
+will report an error if it needs to remove
+a preprocessor directive that spans more than one line,
+for example, if it has a multi-line
+comment hanging off its right hand end.
The
.Fl e
-option changes the behaviour so that,
-where possible,
-such lines are left unprocessed instead of reporting an error.
+flag makes it ignore the line instead.
+.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 .
.Pp
.It Fl K
Always treat the result of
@@ -292,49 +305,15 @@ This is useful for working out the number of possible combinations
of interdependent defined/undefined symbols.
.Pp
.It Fl t
-Disables parsing for C comments
+Disables parsing for C strings, comments,
and line continuations,
which is useful
for plain text.
-.Pp
-.It Fl iD Ns Ar sym Ns Op = Ns Ar val
-.It Fl iU Ns Ar sym
-Ignore
-.Ic #ifdef Ns s .
-If your C code uses
-.Ic #ifdef Ns s
-to delimit non-C lines,
-such as comments
-or code which is under construction,
-then you must tell
-.Nm
-which symbols are used for that purpose so that it will not try to parse
-comments
-and line continuations
-inside those
-.Ic #ifdef Ns s .
-You can specify ignored symbols with
-.Fl iD Ns Ar sym Ns Oo = Ns Ar val Oc
-and
-.Fl iU Ns Ar sym
-similar to
-.Fl D Ns Ar sym Ns Op = Ns Ar val
+This is a blanket version of the
+.Fl iD
and
-.Fl U Ns Ar sym
-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 .
+.Fl iU
+flags.
.Pp
.It Fl V
Print version details.
@@ -402,7 +381,8 @@ rewrote it to support
.Sh BUGS
Expression evaluation is very limited.
.Pp
-Preprocessor control lines split across more than one physical line
+Handling one line at a time means
+preprocessor directives split across more than one physical line
(because of comments or backslash-newline)
cannot be handled in every situation.
.Pp

0 comments on commit d830a98

Please sign in to comment.
Something went wrong with that request. Please try again.