summaryrefslogtreecommitdiff
path: root/cpp.1
diff options
context:
space:
mode:
authorreed <reed>2008-02-19 16:32:39 +0000
committerreed <reed>2008-02-19 16:32:39 +0000
commit420de38473fd43f56b18d84d78a6c41a9fcf6b8a (patch)
treed7964056a735d2254b377a302f392bac8d88b933 /cpp.1
parenta69a2d040377d7f1bb92d71c53892bb2e8a1c180 (diff)
Many man page improvements for formatting, removing trailing spaces,
punctuation, proper use of roff/mdoc macros, etc. Also some better wording and clarifications. This was provided by Thomas Klausner. Thank you!
Diffstat (limited to 'cpp.1')
-rw-r--r--cpp.163
1 files changed, 33 insertions, 30 deletions
diff --git a/cpp.1 b/cpp.1
index 9578330..87ca1c9 100644
--- a/cpp.1
+++ b/cpp.1
@@ -3,22 +3,22 @@
.\" $OpenBSD$
."\
.\" Copyright (c) 2007 Jeremy C. Reed <reed@reedmedia.net>
-.\"
-.\" Permission to use, copy, modify, and/or distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
+.\"
+.\" Permission to use, copy, modify, and/or distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM
-.\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
-.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND
-.\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR AND CONTRIBUTORS DISCLAIM
+.\" ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL AUTHOR AND
+.\" CONTRIBUTORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
.\" THIS SOFTWARE.
.\"
.Dd September 17, 2007
-.Dt cpp 1
+.Dt CPP 1
.Os
.Sh NAME
.Nm cpp
@@ -34,7 +34,6 @@
.Op Fl U Ar macro
.Op Ar infile | -
.Op Ar outfile
-.Pp
.Sh DESCRIPTION
The
.Nm
@@ -45,7 +44,7 @@ It is used to include header files,
expand macro definitions,
and perform conditional compilation.
.Pp
-The
+The
.Ar infile
input file is optional.
If not provided or the file name is
@@ -65,6 +64,9 @@ It writes by default to standard output.
.\"
The options are as follows:
.Bl -tag -width Ds
+.It Fl ?
+Show command line usage for
+.Nm .
.It Fl C
Do not discard comments.
.It Fl D Ar macro[=value]
@@ -73,14 +75,14 @@ Fake a definition at the beginning by using
.Ar macro=value Dc .
If
.Ar value
-is not set on command-line, then defines as 1.
+is not set on command-line, then define it as 1.
.\" TODO: show example
.It Fl dM
Print list of
.Dq #define
statements to standard output for all defined macros other than
builtin macros (see below).
-The normal results of preprocessing are not outputted.
+The normal results of preprocessing are not output.
.\" TODO this doesn't show predefined macros
.\" other -d options are ignored
.It Fl I Ar path
@@ -106,8 +108,9 @@ Generate dependencies for
Add
.Ar path
to the list of system directories containing needed header files.
+The
.Fl S
-may be specified multiple times.
+option may be specified multiple times.
Note:
.Nm
does not have a default include directory defined.
@@ -120,25 +123,22 @@ Do not define the
.Dv __DATE__ ,
.Dv __STDC__ ,
and
-.Dv __STDC_VERSION__ ,
+.Dv __STDC_VERSION__
macros.
.\"
.It Fl U Ar macro
Undefine a macro at the beginning by using
.Do #undef
.Ar macro Dc .
-.It Fl v
-Display version.
.It Fl V
Verbose debugging output.
.Fl V
can be repeated for further details.
.\" -V only available if cpp source built with CPP_DEBUG, which is the default.
-.It Fl ?
-Show command line usage for
-.Nm .
+.It Fl v
+Display version.
.El
-.Sh Builtin Macros
+.Ss Builtin Macros
A few macros are interpreted inside the
.Nm cpp
program:
@@ -151,19 +151,22 @@ in quotes.
.It __FILE__
Expands to the name of the current input file in quotes.
When read from standard input, it expands to
-.Qq Ao stdin Ac .
+.Qq Aq stdin .
.It __LINE__
Expands to the line number of the current line containing the macro.
.It __STDC__
Expands to the constant 1.
-This means the compiler conforms to ISO Standard C,
-ISO/IEC 9899:1990
+This means the compiler conforms to
+.St -isoC
.Po also known as
.Do C90 Dc Pc .
.It __STDC_VERSION__
Expands to
.Dq 199901L
-which indicates it supports ISO/IEC 9899:1999 standard
+which indicates that
+.Nm
+supports
+.St -isoC-99
.Po commonly referred to as
.Do C99 Dc Pc .
.It __TIME__
@@ -193,8 +196,8 @@ An error occurred.
.Sh HISTORY
The
.Nm
-command comes from the original Portable C Compiler by S. C.
-Johnson, written in the late 70's.
+command comes from the original Portable C Compiler by S. C. Johnson,
+written in the late 70's.
The code originates from the V6 preprocessor with some additions
from V7 cpp and ansi/c99 support.
.Pp