52 cout <<
usage() <<
'\n';
58 return string(
"usage:\n")
61 "\tDisplay this message and exit.\n"
63 "\tDisplay version information and exit.\n"
65 "\tSimplify source FILEs in accordance with OPTIONs, "
66 "parsing in the manner of the C preprocessor.\n"
67 "\tInput lines may be dropped from output. Truth functional "
68 "directives may be simplified on output.\n"
70 "\tLike the source command, with all simplified source files "
71 "output beneath a specified directory, mirroring their original "
74 "\tList preprocessor symbols from FILEs in accordance with "
75 "OPTIONs, parsing in the manner of the C preprocessor.\n"
77 "\tList #includes fom FILEs in accordance with OPTIONs, parsing in "
78 "the manner of the C preprocessor\n"
80 "\tList #defines and #undefs fom FILEs in accordance with OPTIONs, "
81 "parsing in the manner of the C preprocessor.\n"
83 "\tList #pragmas fom FILEs in accordance with OPTIONs, parsing in "
84 "the manner of the C preprocessor\n"
86 "\tList #lines fom FILEs in accordance with OPTIONs, parsing in "
87 "the manner of the C preprocessor\n"
89 "\tList #-directives fom FILEs in accordance with OPTIONs, "
90 "parsing in the manner of the C preprocessor. "
91 "(Directives are #includes, #defines, #undefs, "
92 "#pragmas, #errors, #lines).\n"
95 "\t-fARGFILE, --file ARGFILE\n"
96 "\t\tRead other arguments from ARGFILE.\n"
98 "\t\tRecurse into directories to find input files.\n"
99 "\t-FEXT1[,EXT2...]\n"
100 "\t--filter EXT1[,EXT2...]\n"
101 "\t\tProcess only input files that have one of the file extensions "
103 "\t-DSYM[=VAL], --define SYM[=VAL]\n"
104 "\t\tAssume symbol SYM to be defined [=VAL]\n"
105 "\t-USYM, --undef SYM\n"
106 "\t\tAssume symbol SYM to be undefined.\n"
108 "\t\tAssume that any symbol that is not --define-ed is implicitly "
111 "\t--gag { progress| info | warning | error | abend }\n"
112 "\t\tSuppress diagnostics no worse than "
113 "{progress | info | warning | error | abend}.\n"
114 "\t-gs, --gag summary\n"
115 "\t\tSuppress summary diagnostics at exit.\n"
116 "\t\t(Default: -gp -gi -gs)\n"
118 "\t\tOutput all diagnostics.\n"
119 "\t-K, --keepgoing\n"
120 "\t\tIf a parse error is encountered in an input file, continue "
121 "processing subsequent input files.\n"
122 "\t--no-transients\n"
123 "\t\tBy default an in-source #define SYM or #undef SYM directive "
124 "is transiently treated as a -DSYM or -USYM option within the "
125 "source file where it is found. This option suppresses the "
126 "default behaviour at your own risk.\n"
128 "\t\tApart from #-directives, input is Plain Old Data.\n"
129 "\t\tComments and quotations will not be parsed.\n"
131 "\t\tEvaluate constants in the \"work-in-progress\" directives "
132 "\"#if 0\",\"#if 1\". (Default: do not evaluate.)\n"
133 "\t--max-expansion N[K]\n"
134 "\t\tLimit the length of reported macro-expansions "
139 "\t\tOverwrite input file with output file. Implied by --recurse\n"
140 "\t\tWith -r, stdin supplies the input *filenames*.\n"
141 "\t\tOtherwise stdin supplies an input *file*; "
142 "the output file is cout.\n"
143 "\t-bSUFFIX, --backup SUFFIX\n"
144 "\t\tBackup each input file by appending SUFFIX to the name.\n"
145 "\t\tApplies only with -r.\n"
146 "\t-kd, --discard drop\n"
147 "\t\tDrop discarded lines from output.\n"
148 "\t-kb, --discard blank\n"
149 "\t\tBlank discarded lines on output.\n"
150 "\t-kc, --discard comment\n"
151 "\t\tComment out discarded lines on output.\n"
152 "\t-xd, --conflict delete\n"
153 "\t\tDelete #defines and #undefs that contradict -D or "
155 "\t-xc, --conflict comment\n"
156 "\t\tInsert diagnostic comments on contradictions as per -xd. "
158 "\t-xe, --conflict error\n"
159 "\t\tInsert diagnostic #errors on contradictions as per -xd.\n"
161 "\t\tGenerate #line directives to make CPP line-numbering of output"
162 " agree with input even of lines are dropped.\n"
163 "\t-c, --complement\n"
164 "\t\tComplement. Retain the lines that ought to be dropped and "
166 "\t\t(Retained #-directives will still be simplified where "
170 "\tThe --recurse and --replace options are implied for this "
172 "\t-kd, --discard drop\n"
173 "\t\tDrop discarded lines from output.\n"
174 "\t-kb, --discard blank\n"
175 "\t\tBlank discarded lines on output.\n"
176 "\t-kc, --discard comment\n"
177 "\t\tComment out discarded lines on output.\n"
178 "\t-xd, --conflict delete\n"
179 "\t\tDelete #defines and #undefs that contradict -D or "
181 "\t-xc, --conflict comment\n"
182 "\t\tInsert diagnostic comments on contradictions as per -xd. "
184 "\t-xe, --conflict error\n"
185 "\t\tInsert diagnostic #errors on contradictions as per -xd.\n"
187 "\t\tGenerate #line directives to make CPP line-numbering of output"
188 " agree with input even of lines are dropped.\n"
189 "\t-c, --complement\n"
190 "\t\tComplement. Retain the lines that ought to be dropped and "
192 "\t\t(Retained #-directives will still be simplified where "
195 "\t\tGenerate a spin under directory DIRNAME, which will be "
196 " created if required. Every simplified source file will be output "
197 "to a file with the same name, relative to DIRNAME.\n"
198 "\t-pPATHNAME, --prefix PATHNAME\n"
199 "\t\tIn organizing output files beneath the directory DIRNAME, "
200 "DIRNAME will be equated to the path prefix PATHNAME of any "
203 "symbols OPTIONs:-\n"
205 "\t\tList symbols that occur #if[[n]def]/#elif directives.\n"
207 "\t\tList symbols that occur in #define directives.\n"
209 "\t\tList symbols that occur in #undef directives.\n"
211 "\t\tList symbols that occur in #include directives.\n"
213 "\t\tList symbols that occur in #lines directives.\n"
214 "\t(Default: -i -d -u --includes --lns)\n"
215 "\t-o, --once-only\n"
216 "\t\tList only the first occurrence of of each distinct "
217 "reference a symbol\n"
218 "\t--once-per_file\n"
219 "\t\tList only the first occurrence per file of of each distinct "
220 "reference of a symbol\n"
222 "\t\tList only symbols from operative directives\n"
224 "\t\tList only symbols from inoperative directives\n"
226 "\t\tReport the source file and line number of each listed "
229 "\t\tReport the expansion of each symbol reference and "
230 "its resolved value, if any\n"
232 "\t\tReport the progressive expansion of each symbol "
233 "reference and its resolved value, if any. "
234 "Implies --expand.\n"
235 "\t--select=NAME1[*][,NAME2[*]...]\n"
236 "\t\tReport only on symbols that match one of the optionally "
237 "wildcard-terminated names\n"
239 "includes OPTIONs:-\n"
241 "\t\tList system headers, i.e. <header.h>\n"
243 "\t\tList local headers, i.e. \"header.h\"\n"
244 "\t(Default: -s -L)\n"
245 "\t-o, --once-only\n"
246 "\t\tList only the first occurrence of each header. "
247 "\t--once-per-file\n"
248 "\t\tList only the first occurrence per file of each header\n"
250 "\t\tList only headers from operative directives.\n"
252 "\t\tList only headers from inoperative directives.\n"
254 "\t\tReport the source file and line number of each listed "
258 "\t-o, --once-only\n"
259 "\t\tList only the first occurrence of each distinct #define or "
261 "\t--once-per-file\n"
262 "\t\tList only the first occurrence per file of each distinct "
263 "#define or #undef directive\n"
265 "\t\tList only operative #define and #undef directives.\n"
267 "\t\tList only inoperative #define and #undef directives.\n"
269 "\t\tReport the source file and line number of each listed "
272 "pragmas OPTIONs:-\n"
273 "\t-o, --once-only\n"
274 "\t\tList only the first occurrence of each distinct pragma\n"
275 "\t--once-per-file\n"
276 "\t\tList only the first occurrence per file of each distinct "
279 "\t\tList only pragmas from lines that are retained.\n"
281 "\t\tList only pragmas from lines that are dropped.\n"
283 "\t\tReport the source file and line number of each listed "
287 "\t-o, --once-only\n"
288 "\t\tList only the first occurrence of each #error directive\n"
289 "\t--once-per-file\n"
290 "\t\tList only the first occurrence per file of each "
293 "\t\tList only operative #error directives.\n"
295 "\t\tList only inoperative #error directives.\n"
297 "\t\tReport the source file and line number of each listed "
301 "\t-o, --once-only\n"
302 "\t\tList only the first occurrence of each #line directive\n"
303 "\t--once-per-file\n"
304 "\t\tList only the first occurrence per file of each "
307 "\t\tList only operative #line directives.\n"
309 "\t\tList only inoperative #line directives.\n"
311 "\t\tReport the source file and line number of each listed "
314 "directives OPTIONs:-\n"
315 "\t-o, --once-only\n"
316 "\t\tList only the first occurrence of each distinct directive\n"
317 "\t--once-per-file\n"
318 "\t\tList only the first occurrence per file of each distinct "
321 "\t\tList only operative directives.\n"
323 "\t\tList only inoperative directives.\n"
325 "\t\tReport the source file and line number of each listed "
string usage()
Get program usage summary in a string.
void help()
Write brief command usage information to cout.
static std::string const & prog_name()
Get the program's name.