summaryrefslogtreecommitdiff
path: root/libexec/auxcpp/auxcpp.1
blob: 1863753ea21904c16419be03fbab2707b5faf6dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
.\" Copyright (c) 2002 Thomas Pornin <pornin@bolet.org.
.\"
.\" Permission to use, copy, modify, and 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 DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR 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.
.TH AUXCPP 1 "Oct 21 2000"
.SH NAME
auxcpp \- C preprocessor
.SH SYNOPSIS
.B auxcpp 
[
.I options
]
[
.I file
]
.SH DESCRIPTION
.LP
.B auxcpp
is a C preprocessor mostly compatible with ISO-C99.
It is rather strict and uses only a small amount of memory. It uses
standard input as primary input if no file argument is given.
.SH OPTIONS
There are several classes of options.
.TP
.B Language Options
.TP
.BI \-C
keep comments in the output.
.TP
.BI \-s
if a rogue '#' is encountered, do not emit an error and keep it in
the output.
.TP
.B \-l, \-P
supress the emission of '#line' directives in the output.
.TP
.BI \-lg
convert the '#line' to the gcc-style equivalent.
.TP
.BI \-CC
disable C++-like comments (a '//' begins a comment, up to the end
of the line). Use this option to get closer to C90 behaviour.
.TP
.B \-a, \-na
handle assertions (defined with #assert);
.B \-a
also defines the standard assertions
.I #machine
,
.I #cpu
and
.I #system
(see
.B \-e
to get the local definition of such assertions).
.TP
.BI \-a0
disable assertion support.
.TP
.BI \-V
disable support for macros with a variable number of arguments: in C99,
a macro may be declared with
.I ...
as the last argument; inside the replacement list,
.I __VA_ARGS__
is replaced with the optional extra arguments given in the call to the macro.
Use this option to get closer to C90 behaviour.
.TP
.BI \-u
enable UTF-8 support: with this option, the source is considered as
an ISO/10646 source, encoded in UTF-8. Characters represented as two bytes
or more are considered as alphabetic characters, like letters, and
therefore usable in identifiers. These characters hold the same
syntactic value than the corresponding Universal Character Names.
.TP
.BI \-X
enable
.B \-a, \-u
and
.B \-Y.
This should make
.B auxcpp
behave closer to what is requested from a "modern" C preprocessor.
.TP
.BI \-c90
enable
.B \-V
and
.B \-CC,
and do not define
.B __STDC_VERSION__.
This should make
.B auxcpp
mimic older C90 behaviour.
.TP
.BI \-t
disable trigraph support; this seems to be required for some legacy code.
.TP
.B Warning Options
.TP
.BI \-wt
emit a final warning when trigraphs are encountered.
.TP
.BI \-wtt
emit warnings for each trigraph encountered.
.TP
.BI \-wa
emit annoying warnings (these are usually useless).
.TP
.BI \-w0
supress standard warnings.
.TP
.B Directory Options
.TP
.BI \-I directory
.TP
.BI "\-I " directory
add
.I directory
to the include path, before the standard include path.
.TP
.BI \-J directory
.TP
.BI "\-J " directory
add
.I directory
to the include path, after the standard include path.
.TP
.BI \-zI
do not use the standard (compile-time) include path.
.TP
.BI \-M
emit only the names of encountered files, separated by spaces; this is
intended for automatic generation of Makefile dependencies.
.TP
.BI \-Ma
do the same as
.B \-M
but also for system files.
.TP
.BI "\-o " file
direct the ouput to
.I file
instead of standard output.
.TP
.B Macro Options
.TP
.BI \-D macro
predefine
.I macro
with content
.B 1.
.TP
.BI \-D macro=def
predefine
.I macro
with the content
.I def.
.TP
.BI \-U macro
undefine
.I macro.
.TP
.BI \-Y
predefine system-dependant macros.
.TP
.BI \-Z
do not predefine special macros such as
.B __TIME__.
.TP
.BI \-A foo(bar)
add
.I foo(bar)
to the list of assertions.
.TP
.BI \-B foo(bar)
remove
.I foo(bar)
of the list of assertions; you may also use
.BI \-B foo
to remove all
.BI \-B foo(xxx)
from the list of assertions.
.TP
.BI \-d
instead of normal output, emit '#define' directives representing all
macros defined during processing.
.TP
.BI \-e
instead of normal output, emit '#assert' directives representing all
assertions defined during processing.
.TP
.B Miscellaneous Options
.TP
.BI \-v
print version number, include path and (optionaly) defined assertions.
.TP
.BI \-h
print some help.
.SH ENVIRONMENT
.PP
.B auxcpp
is not itself affected by environment variables. However, it uses
library functions that might be affected, depending on the system.
.SH AUTHOR
Thomas Pornin <pornin@bolet.org>
.SH BUGS
.PP
.B auxcpp
is considered stable software. However improbable it is, please report
bugs to the author (possibly with a file that exhibits the problem) if
the latest version, available from this site:
.TP
http://pornin.nerim.net/ucpp/
.PP
has the bug.