|
1 '\" te |
|
2 .\" Copyright (c) 1986-2006 AT&T Knowledge Ventures |
|
3 .\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt |
|
4 .\" Portions Copyright (c) 2007, Sun Microsystems, Inc. |
|
5 .TH msgcpp 1 "9 Oct 2007" "SunOS 5.11" "User Commands" |
|
6 .SH NAME |
|
7 msgcpp \- C language message catalog preprocessor |
|
8 .SH SYNOPSIS |
|
9 .LP |
|
10 .nf |
|
11 \fBmsgcpp\fR [\fB-ACEHMPVX\fR] [\fB-D\fR \fIname\fR[\fB=\fR\fIvalue\fR]] [\fB-I\fR \fIdirectory\fR] [\fB-U\fR \fIname\fR] |
|
12 [\fB-T\fR[\fIlength\fR]] [\fB-Y\fR \fIdirectory\fR] [\fIinput\fR [\fIoutput\fR] ] |
|
13 .fi |
|
14 |
|
15 .SH DESCRIPTION |
|
16 .sp |
|
17 .LP |
|
18 \fBmsgcpp\fR is a C language message catalog preprocessor. It accepts \fBcpp\fR(1) style options and arguments. \fBmsgcpp\fR preprocesses an input C source file and emits keyed lines to the output, usually for further processing by\fBmsgcc\fR(1). \fBmsgcc\fR output is in the \fBgencat\fR(1) syntax. Candidate message text is determined by arguments to the last \fB<error.h>\fR and \fB<option.h>\fR functions. The \fBmsgcpp\fR keyed output lines are: |
|
19 .sp |
|
20 .ne 2 |
|
21 .mk |
|
22 .na |
|
23 \fB\fBcmd\fR \fIcommand\fR\fR |
|
24 .ad |
|
25 .RS 19n |
|
26 .rt |
|
27 \fIcommand\fR is a candidate for \fB--??keys\fR option string generation. This is triggered by \fBb_command(int argc\fR, in the input. |
|
28 .RE |
|
29 |
|
30 .sp |
|
31 .ne 2 |
|
32 .mk |
|
33 .na |
|
34 \fB\fBdef\fR \fIname string\fR\fR |
|
35 .ad |
|
36 .RS 19n |
|
37 .rt |
|
38 \fIname\fR is a candidate variable with \fIstring\fR value string. |
|
39 .RE |
|
40 |
|
41 .sp |
|
42 .ne 2 |
|
43 .mk |
|
44 .na |
|
45 \fB\fBstr\fR \fIstring\fR\fR |
|
46 .ad |
|
47 .RS 19n |
|
48 .rt |
|
49 \fIstring\fR should be entered into the catalog. |
|
50 .RE |
|
51 |
|
52 .sp |
|
53 .ne 2 |
|
54 .mk |
|
55 .na |
|
56 \fB\fBvar\fR \fIname\fR\fR |
|
57 .ad |
|
58 .RS 19n |
|
59 .rt |
|
60 If \fBdef\fR \fIname\fR occurs then its string value should be entered into the catalog. |
|
61 .RE |
|
62 |
|
63 .sp |
|
64 .LP |
|
65 The input source file is preprocessed with the \fBpp:allpossible\fR option on. This enables non-C semantics. All source should first be compiled error-free with a real compiler before running \fBmsgcpp\fR. The following changes are enabled for the top level files. Included file behavior is not affected. |
|
66 .RS +4 |
|
67 .TP |
|
68 1. |
|
69 All \fB#if\fR, \fB#ifdef\fR and \fB#ifndef\fR branches are enabled. |
|
70 .RE |
|
71 .RS +4 |
|
72 .TP |
|
73 2. |
|
74 The first definition for a macro is retained, even when subsequent \fB#define\fR statements would normally redefine the macro. \fB#undef\fR must be used to redefine a macro. |
|
75 .RE |
|
76 .RS +4 |
|
77 .TP |
|
78 3. |
|
79 Macro calls with an improper number of arguments are silently ignored. |
|
80 .RE |
|
81 .RS +4 |
|
82 .TP |
|
83 4. |
|
84 \fB#include\fR on non-existent headers are silently ignored. |
|
85 .RE |
|
86 .RS +4 |
|
87 .TP |
|
88 5. |
|
89 Invalid C source characters are silently ignored. |
|
90 .RE |
|
91 .sp |
|
92 .LP |
|
93 \fBmsgcat.h\fR is included if it exists. This file may contain macro definitions for functions that translate string arguments. If \fBfoo\fR is a function that translates its string arguments then include the line \fB#define foo _TRANSLATE_\fR in \fBmsgcat.h\fR, or specify the option \fB-Dfoo=_TRANSLATE_\fR. If \fBbar\fR is a function that translates string arguments if the first argument is \fBstderr\fR, then use either \fB#define bar _STDIO_\fR or \fB-Dbar=_STDIO_\fR. |
|
94 .sp |
|
95 .LP |
|
96 The macro \fB_BLD_msgcat\fR is defined to be \fB1\fR. As an alternative to \fBmsgcat.h\fR, \fB_TRANSLATE_\fR definitions could be placed inside \fB#ifdef _BLD_msgcat ... #endif\fR. |
|
97 .SH OPTIONS |
|
98 .sp |
|
99 .LP |
|
100 The following options are supported: |
|
101 .sp |
|
102 .ne 2 |
|
103 .mk |
|
104 .na |
|
105 \fB\fB-A\fR\fR |
|
106 .ad |
|
107 .br |
|
108 .na |
|
109 \fB\fB--assert=\fR\fIassertion\fR\fR |
|
110 .ad |
|
111 .RS 25n |
|
112 .rt |
|
113 Enter the assertion using \fB#assert\fR for system V compatibility. |
|
114 .RE |
|
115 |
|
116 .sp |
|
117 .ne 2 |
|
118 .mk |
|
119 .na |
|
120 \fB\fB-C\fR\fR |
|
121 .ad |
|
122 .br |
|
123 .na |
|
124 \fB\fB--comments\fR\fR |
|
125 .ad |
|
126 .RS 25n |
|
127 .rt |
|
128 Pass comments to the output. |
|
129 .sp |
|
130 Comments are omitted by default. |
|
131 .RE |
|
132 |
|
133 .sp |
|
134 .ne 2 |
|
135 .mk |
|
136 .na |
|
137 \fB\fB-D\fR\fR |
|
138 .ad |
|
139 .br |
|
140 .na |
|
141 \fB\fB--define=\fR\fIname\fR\fB[=\fR\fIvalue\fR\fB]\fR\fR |
|
142 .ad |
|
143 .RS 25n |
|
144 .rt |
|
145 Define the macro \fIname\fR to have \fIvalue\fR. This is the only portable way to pass options through \fBcc\fR to \fBcpp\fR(1). |
|
146 .RS +4 |
|
147 .TP |
|
148 .ie t \(bu |
|
149 .el o |
|
150 If \fB=\fR\fIvalue\fR is omitted, \fIvalue\fR is assumed to be \fB1\fR . |
|
151 .RE |
|
152 .RS +4 |
|
153 .TP |
|
154 .ie t \(bu |
|
155 .el o |
|
156 If \fIname\fR begins with \fB:\fR, then it is interpreted as a \fBlibpp\fR \fB#pragma pp\fR: statement. |
|
157 .RE |
|
158 .RS +4 |
|
159 .TP |
|
160 .ie t \(bu |
|
161 .el o |
|
162 If \fIname\fR begins with \fB%\fR, it is interpreted as a \fBlibpp\fR \fB#\fR directive statement. |
|
163 .RE |
|
164 .RS +4 |
|
165 .TP |
|
166 .ie t \(bu |
|
167 .el o |
|
168 If name begins with a \fB-\fR or a \fB+\fR, it is interpreted as a \fBlibpp\fR option. |
|
169 .sp |
|
170 \fB-\fR turns the option on, \fB+\fR turns it off. |
|
171 .RE |
|
172 .RS +4 |
|
173 .TP |
|
174 .ie t \(bu |
|
175 .el o |
|
176 Most options have a \fB#pragma\fR counterpart that is listed with the option definition. |
|
177 .RE |
|
178 .sp |
|
179 .ne 2 |
|
180 .mk |
|
181 .na |
|
182 \fB\fB-D-C\fR\fR |
|
183 .ad |
|
184 .br |
|
185 .na |
|
186 \fB\fBpp:compatibility\fR\fR |
|
187 .ad |
|
188 .sp .6 |
|
189 .RS 4n |
|
190 Preprocess for K&R C compatibility. |
|
191 .RE |
|
192 |
|
193 .sp |
|
194 .ne 2 |
|
195 .mk |
|
196 .na |
|
197 \fB\fB-D-D\fR\fIlevel\fR\fR |
|
198 .ad |
|
199 .br |
|
200 .na |
|
201 \fB\fBpp:debug level\fR \fIlevel\fR\fR |
|
202 .ad |
|
203 .sp .6 |
|
204 .RS 4n |
|
205 Set the debug trace level. |
|
206 .sp |
|
207 Specify \fIlevel\fR as a number greater than or equal to \fB0\fR. Higher levels produce more output. Levels higher than \fB3\fR can only be enabled in the \fB-g\fR compiled versions. |
|
208 .RE |
|
209 |
|
210 .sp |
|
211 .ne 2 |
|
212 .mk |
|
213 .na |
|
214 \fB\fB-D-F\fR\fIname\fR\fR |
|
215 .ad |
|
216 .sp .6 |
|
217 .RS 4n |
|
218 Set the main input file name to \fIname\fR. This only affects the error messages and the line sync output. |
|
219 .RE |
|
220 |
|
221 .sp |
|
222 .ne 2 |
|
223 .mk |
|
224 .na |
|
225 \fB\fB-D-H\fR\fR |
|
226 .ad |
|
227 .br |
|
228 .na |
|
229 \fB\fBpp:hosted\fR\fR |
|
230 .ad |
|
231 .sp .6 |
|
232 .RS 4n |
|
233 All directories are hosted. Compatibility warning messages from the hosted directory headers are suppressed. |
|
234 .RE |
|
235 |
|
236 .sp |
|
237 .ne 2 |
|
238 .mk |
|
239 .na |
|
240 \fB\fB-D-I\fR\fR |
|
241 .ad |
|
242 .br |
|
243 .na |
|
244 \fB\fBpp:cdir\fR\fR |
|
245 .ad |
|
246 .sp .6 |
|
247 .RS 4n |
|
248 All directories contain C headers. This option is only used only with \fB-D-+\fR. |
|
249 .RE |
|
250 |
|
251 .sp |
|
252 .ne 2 |
|
253 .mk |
|
254 .na |
|
255 \fB\fB-D-K\fR\fR |
|
256 .ad |
|
257 .br |
|
258 .na |
|
259 \fB\fBpp:keyargs\fR\fR |
|
260 .ad |
|
261 .sp .6 |
|
262 .RS 4n |
|
263 Enable the non-standard \fIname\fR\fB=\fR\fIvalue\fR macro argument mode. |
|
264 .RE |
|
265 |
|
266 .sp |
|
267 .ne 2 |
|
268 .mk |
|
269 .na |
|
270 \fB\fB-D-L\fR\fB[\fR\fIid\fR\fB]\fR\fR |
|
271 .ad |
|
272 .br |
|
273 .na |
|
274 \fB\fBpp:lineid [\fR\fIid\fR]\fR |
|
275 .ad |
|
276 .sp .6 |
|
277 .RS 4n |
|
278 Set the line sync directive id to \fIid\fR. If \fIid\fR is not specified, set to null. |
|
279 .RE |
|
280 |
|
281 .sp |
|
282 .ne 2 |
|
283 .mk |
|
284 .na |
|
285 \fB\fB-D-M\fR\fR |
|
286 .ad |
|
287 .br |
|
288 .na |
|
289 \fB\fBpp:nomultiple\fR\fR |
|
290 .ad |
|
291 .sp .6 |
|
292 .RS 4n |
|
293 Disable multiple include detection. |
|
294 .RE |
|
295 |
|
296 .sp |
|
297 .ne 2 |
|
298 .mk |
|
299 .na |
|
300 \fB\fB-D-P\fR\fR |
|
301 .ad |
|
302 .br |
|
303 .na |
|
304 \fB\fBpp:passthrough\fR\fR |
|
305 .ad |
|
306 .sp .6 |
|
307 .RS 4n |
|
308 Enable the non-standard passthrough mode. This can be useful for processing non-C input. |
|
309 .RE |
|
310 |
|
311 .sp |
|
312 .ne 2 |
|
313 .mk |
|
314 .na |
|
315 \fB\fB-D-Q\fR\fR |
|
316 .ad |
|
317 .br |
|
318 .na |
|
319 \fB\fBpp:dump\fR\fR |
|
320 .ad |
|
321 .sp .6 |
|
322 .RS 4n |
|
323 Dump macro definitions to the output so that the output may be passed through \fBcpp\fR again. This is used for generating precompiled headers. |
|
324 .RE |
|
325 |
|
326 .sp |
|
327 .ne 2 |
|
328 .mk |
|
329 .na |
|
330 \fB\fB-D-R\fR\fR |
|
331 .ad |
|
332 .br |
|
333 .na |
|
334 \fB\fBpp:transition\fR\fR |
|
335 .ad |
|
336 .sp .6 |
|
337 .RS 4n |
|
338 Enable the transition preprocessing mode. This is used for compilers that cannot make up their semantics between K&R and ISO C. |
|
339 .RE |
|
340 |
|
341 .sp |
|
342 .ne 2 |
|
343 .mk |
|
344 .na |
|
345 \fB\fB-D-S\fR\fR |
|
346 .ad |
|
347 .br |
|
348 .na |
|
349 \fB\fBpp:strict\fR\fR |
|
350 .ad |
|
351 .sp .6 |
|
352 .RS 4n |
|
353 Enable strict preprocessing semantics and warnings. This works with any mode (compatibility, transition, or the default ISO). |
|
354 .RE |
|
355 |
|
356 .sp |
|
357 .ne 2 |
|
358 .mk |
|
359 .na |
|
360 \fB\fB-D-T\fR\fItest\fR\fR |
|
361 .ad |
|
362 .br |
|
363 .na |
|
364 \fB\fBpp:test\fR \fItest\fR\fR |
|
365 .ad |
|
366 .sp .6 |
|
367 .RS 4n |
|
368 Enable implementation specific test code according to \fItest\fR. |
|
369 .RE |
|
370 |
|
371 .sp |
|
372 .ne 2 |
|
373 .mk |
|
374 .na |
|
375 \fB\fB-D-W\fR\fR |
|
376 .ad |
|
377 .br |
|
378 .na |
|
379 \fB\fBpp:warn\fR\fR |
|
380 .ad |
|
381 .sp .6 |
|
382 .RS 4n |
|
383 Enable pedantic warnings in non-hosted files. |
|
384 .RE |
|
385 |
|
386 .sp |
|
387 .ne 2 |
|
388 .mk |
|
389 .na |
|
390 \fB\fB-D-X\fR\fB[cc]\fR\fR |
|
391 .ad |
|
392 .br |
|
393 .na |
|
394 \fB\fB\fR\fR |
|
395 .ad |
|
396 .sp .6 |
|
397 .RS 4n |
|
398 Preprocess for the \fBcc\fR compiler, which must be an executable path or an executable on \fB$PATH\fR. |
|
399 .RE |
|
400 |
|
401 .sp |
|
402 .ne 2 |
|
403 .mk |
|
404 .na |
|
405 \fB\fB-D-Z\fR\fR |
|
406 .ad |
|
407 .br |
|
408 .na |
|
409 \fB\fBpp:pool\fR\fR |
|
410 .ad |
|
411 .sp .6 |
|
412 .RS 4n |
|
413 Enable pool mode. |
|
414 .RE |
|
415 |
|
416 .sp |
|
417 .ne 2 |
|
418 .mk |
|
419 .na |
|
420 \fB\fB-D-d\fR\fR |
|
421 .ad |
|
422 .sp .6 |
|
423 .RS 4n |
|
424 List canonicalized \fB#define\fR statements for non-predefined macros in the output. |
|
425 .RE |
|
426 |
|
427 .sp |
|
428 .ne 2 |
|
429 .mk |
|
430 .na |
|
431 \fB\fB-D-m\fR\fR |
|
432 .ad |
|
433 .sp .6 |
|
434 .RS 4n |
|
435 List canonicalized \fB#define\fR statements for all macros. All other output is disabled. |
|
436 .RE |
|
437 |
|
438 .sp |
|
439 .ne 2 |
|
440 .mk |
|
441 .na |
|
442 \fB\fB-D-+\fR\fR |
|
443 .ad |
|
444 .br |
|
445 .na |
|
446 \fB\fBpp:plusplus\fR\fR |
|
447 .ad |
|
448 .sp .6 |
|
449 .RS 4n |
|
450 Preprocess for the C++ dialect. |
|
451 .RE |
|
452 |
|
453 .RE |
|
454 |
|
455 .sp |
|
456 .ne 2 |
|
457 .mk |
|
458 .na |
|
459 \fB\fB-E\fR\fR |
|
460 .ad |
|
461 .br |
|
462 .na |
|
463 \fB\fB--preprocess\fR\fR |
|
464 .ad |
|
465 .RS 25n |
|
466 .rt |
|
467 Ignored; for compatibility with very old compilers. |
|
468 .RE |
|
469 |
|
470 .sp |
|
471 .ne 2 |
|
472 .mk |
|
473 .na |
|
474 \fB\fB-H\fR\fR |
|
475 .ad |
|
476 .br |
|
477 .na |
|
478 \fB\fB--include-reference\fR\fR |
|
479 .ad |
|
480 .RS 25n |
|
481 .rt |
|
482 Emit \fB#include\fR file paths on the standard error, one per line, indented to show nesting. |
|
483 .RE |
|
484 |
|
485 .sp |
|
486 .ne 2 |
|
487 .mk |
|
488 .na |
|
489 \fB\fB-I\fR\fR |
|
490 .ad |
|
491 .br |
|
492 .na |
|
493 \fB\fB--include[=\fR\fIdirectory\fR\fB]\fR\fR |
|
494 .ad |
|
495 .RS 25n |
|
496 .rt |
|
497 Append directory to the list of directories searched for \fB#include\fR files. |
|
498 .sp |
|
499 If directory is \fB-\fR: |
|
500 .RS +4 |
|
501 .TP |
|
502 1. |
|
503 \fB-I\fR directories before \fB-I-\fR are searched only for \fB"..."\fR include files |
|
504 .RE |
|
505 .RS +4 |
|
506 .TP |
|
507 2. |
|
508 \fB-I\fR directories after \fB-I-\fR are searched for \fB"..."\fR and \fB<"...">\fR include files |
|
509 .RE |
|
510 .RS +4 |
|
511 .TP |
|
512 3. |
|
513 the directory \fB\&.\fR is searched only if it is explicitly specified by an \fB-I\fR option |
|
514 .RE |
|
515 .sp |
|
516 .ne 2 |
|
517 .mk |
|
518 .na |
|
519 \fB\fB-I-C\fR\fIdirectory\fR\fR |
|
520 .ad |
|
521 .br |
|
522 .na |
|
523 \fB\fBpp:cdir directory\fR\fR |
|
524 .ad |
|
525 .sp .6 |
|
526 .RS 4n |
|
527 Mark \fIdirectory\fR as a C header directory. This option is used with \fBpp:plusplus\fR. |
|
528 .RE |
|
529 |
|
530 .sp |
|
531 .ne 2 |
|
532 .mk |
|
533 .na |
|
534 \fB\fB-I-D[\fR\fIfile\fR]\fR |
|
535 .ad |
|
536 .sp .6 |
|
537 .RS 4n |
|
538 Read the default \fBprobe\fR definitions from \fIfile\fR, or ignore the default definitions if \fIfile\fR is omitted. |
|
539 .RE |
|
540 |
|
541 .sp |
|
542 .ne 2 |
|
543 .mk |
|
544 .na |
|
545 \fB\fB-I-H\fR\fIdirectory\fR\fR |
|
546 .ad |
|
547 .br |
|
548 .na |
|
549 \fB\fBpp:hostdir\fR \fIdirectory\fR\fR |
|
550 .ad |
|
551 .sp .6 |
|
552 .RS 4n |
|
553 Mark directory as a hosted directory. Headers from hosted directories have compatibility warnings disabled. |
|
554 .RE |
|
555 |
|
556 .sp |
|
557 .ne 2 |
|
558 .mk |
|
559 .na |
|
560 \fB\fB-I-I\fR\fIheader\fR\fR |
|
561 .ad |
|
562 .br |
|
563 .na |
|
564 \fB\fBpp:ignore\fR \fIheader\fR\fR |
|
565 .ad |
|
566 .sp .6 |
|
567 .RS 4n |
|
568 Add \fIheader\fR to the list of ignored headers. |
|
569 .RE |
|
570 |
|
571 .sp |
|
572 .ne 2 |
|
573 .mk |
|
574 .na |
|
575 \fB\fB-I-M\fR\fIfile\fR\fR |
|
576 .ad |
|
577 .sp .6 |
|
578 .RS 4n |
|
579 \fIfile\fR contains a sequence of header \fB[= "map" ]\fR lines, where header is either \fB<name>\fR or \fB"name"\fR, and \fB"map"\fR is an explicit binding for header. header is ignored \fBif = "map"\fR is omitted. |
|
580 .RE |
|
581 |
|
582 .sp |
|
583 .ne 2 |
|
584 .mk |
|
585 .na |
|
586 \fB\fB-I-R\fR\fIfile\fR\fR |
|
587 .ad |
|
588 .sp .6 |
|
589 .RS 4n |
|
590 Include \fIfile\fR but do not emit text or line syncs. |
|
591 .RE |
|
592 |
|
593 .sp |
|
594 .ne 2 |
|
595 .mk |
|
596 .na |
|
597 \fB\fB-I-S\fR\fIdirectory\fR\fR |
|
598 .ad |
|
599 .sp .6 |
|
600 .RS 4n |
|
601 Add \fIdirectory\fR to the default standard include directory list. |
|
602 .RE |
|
603 |
|
604 .sp |
|
605 .ne 2 |
|
606 .mk |
|
607 .na |
|
608 \fB\fB-I-T\fR\fIfile\fR\fR |
|
609 .ad |
|
610 .sp .6 |
|
611 .RS 4n |
|
612 Include \fIfile\fR and emit text to the output file. The option value can be omitted. |
|
613 .RE |
|
614 |
|
615 .RE |
|
616 |
|
617 .sp |
|
618 .ne 2 |
|
619 .mk |
|
620 .na |
|
621 \fB\fB-M\fR\fR |
|
622 .ad |
|
623 .br |
|
624 .na |
|
625 \fB\fB--dependencies\fR\fR |
|
626 .ad |
|
627 .RS 25n |
|
628 .rt |
|
629 Generate \fBmake\fR(1S) dependencies. This option is not needed with \fBnmake\fR. |
|
630 .sp |
|
631 The \fB-M\fR option can be followed by optional flags to change the dependency output styles. |
|
632 .sp |
|
633 The following optional flags are supported: |
|
634 .sp |
|
635 .ne 2 |
|
636 .mk |
|
637 .na |
|
638 \fB\fBD\fR\fR |
|
639 .ad |
|
640 .RS 5n |
|
641 .rt |
|
642 Generate dependencies in a separate \fB\&.d\fR file. Preprocessed output is still written to output, or the standard output if output is omitted. |
|
643 .RE |
|
644 |
|
645 .sp |
|
646 .ne 2 |
|
647 .mk |
|
648 .na |
|
649 \fB\fBG\fR\fR |
|
650 .ad |
|
651 .RS 5n |
|
652 .rt |
|
653 Also generate missing dependencies. |
|
654 .RE |
|
655 |
|
656 .sp |
|
657 .ne 2 |
|
658 .mk |
|
659 .na |
|
660 \fB\fBM\fR\fR |
|
661 .ad |
|
662 .RS 5n |
|
663 .rt |
|
664 Only generate local header dependencies. Hosted headers are omitted. Hosted headers are determined by the \fB-I-H\fR option and the -\fB-pp:hosted\fR and \fBpp:hostdir pragmas\fR. No special distinction is made between the \fB""\fR and \fB<>\fR include styles. |
|
665 .RE |
|
666 |
|
667 .RE |
|
668 |
|
669 .sp |
|
670 .ne 2 |
|
671 .mk |
|
672 .na |
|
673 \fB\fB-P\fR\fR |
|
674 .ad |
|
675 .br |
|
676 .na |
|
677 \fB\fB--sync\fR\fR |
|
678 .ad |
|
679 .RS 25n |
|
680 .rt |
|
681 Emit line syncs. |
|
682 .sp |
|
683 Line sync is turned on by default. \fB-P\fR means \fB--nosync\fR. |
|
684 .RE |
|
685 |
|
686 .sp |
|
687 .ne 2 |
|
688 .mk |
|
689 .na |
|
690 \fB\fB-T\fR\fB[\fR\fIlength\fR\fB]\fR\fR |
|
691 .ad |
|
692 .RS 25n |
|
693 .rt |
|
694 If not \fBgcc\fR, truncate identifiers to \fIlength\fR characters for compatibility with old AT&T compilers. |
|
695 .RE |
|
696 |
|
697 .sp |
|
698 .ne 2 |
|
699 .mk |
|
700 .na |
|
701 \fB\fB-U\fR\fR |
|
702 .ad |
|
703 .br |
|
704 .na |
|
705 \fB\fB--undefine=\fR\fIname\fR\fR |
|
706 .ad |
|
707 .RS 25n |
|
708 .rt |
|
709 Remove the definition for the macro \fIname\fR. |
|
710 .RE |
|
711 |
|
712 .sp |
|
713 .ne 2 |
|
714 .mk |
|
715 .na |
|
716 \fB\fB-V\fR\fR |
|
717 .ad |
|
718 .br |
|
719 .na |
|
720 \fB\fB--version\fR\fR |
|
721 .ad |
|
722 .RS 25n |
|
723 .rt |
|
724 Emit the \fBlibpp\fR version. |
|
725 .RE |
|
726 |
|
727 .sp |
|
728 .ne 2 |
|
729 .mk |
|
730 .na |
|
731 \fB\fB-X\fR\fR |
|
732 .ad |
|
733 .br |
|
734 .na |
|
735 \fB\fB--argmode\fR\fR |
|
736 .ad |
|
737 .RS 25n |
|
738 .rt |
|
739 Enable \fIname\fR\fB=\fR\fIvalue\fR macro arguments for \fBeasel\fR compatibility. |
|
740 .RE |
|
741 |
|
742 .sp |
|
743 .ne 2 |
|
744 .mk |
|
745 .na |
|
746 \fB\fB-Y\fR\fR |
|
747 .ad |
|
748 .br |
|
749 .na |
|
750 \fB\fB--standard=\fR\fIdirectory\fR\fR |
|
751 .ad |
|
752 .RS 25n |
|
753 .rt |
|
754 Add \fIdirectory\fR to the list searched for \fB#include <...>\fR files. |
|
755 .RE |
|
756 |
|
757 .SH OPERANDS |
|
758 .sp |
|
759 .LP |
|
760 The following operands are supported: |
|
761 .sp |
|
762 .ne 2 |
|
763 .mk |
|
764 .na |
|
765 \fB\fIinput\fR\fR |
|
766 .ad |
|
767 .RS 10n |
|
768 .rt |
|
769 Specifies C source file to preprocess. |
|
770 .RE |
|
771 |
|
772 .sp |
|
773 .ne 2 |
|
774 .mk |
|
775 .na |
|
776 \fB\fIoutput\fR\fR |
|
777 .ad |
|
778 .RS 10n |
|
779 .rt |
|
780 Specifies output file. |
|
781 .RE |
|
782 |
|
783 .SH EXIT STATUS |
|
784 .sp |
|
785 .ne 2 |
|
786 .mk |
|
787 .na |
|
788 \fB\fB0\fR\fR |
|
789 .ad |
|
790 .RS 6n |
|
791 .rt |
|
792 Successful completion. |
|
793 .RE |
|
794 |
|
795 .sp |
|
796 .ne 2 |
|
797 .mk |
|
798 .na |
|
799 \fB\fB>0\fR\fR |
|
800 .ad |
|
801 .RS 6n |
|
802 .rt |
|
803 An error occurred. |
|
804 .RE |
|
805 |
|
806 .SH EXAMPLES |
|
807 .LP |
|
808 \fBExample 1 \fRUsing \fBmsgcpp\fR to Extract Localizable Strings |
|
809 .sp |
|
810 .LP |
|
811 The following example uses \fBmsgcpp\fR to extract localizable strings from the file \fBhello.c\fR, marked using the \fBERROR_dictionary()\fR, and writes them to the file \fBhello.mso\fR: |
|
812 |
|
813 .sp |
|
814 .in +2 |
|
815 .nf |
|
816 example% cat hello.c |
|
817 |
|
818 |
|
819 #include <stdio.h> |
|
820 #include <stdlib.h> |
|
821 |
|
822 /* |
|
823 * dummy macro to avoid including |
|
824 * libast headers |
|
825 */ |
|
826 #define ERROR_dictionary(x) x |
|
827 |
|
828 int main(int ac, char *av[]) |
|
829 { |
|
830 puts( ERROR_dictionary("hello world") ); |
|
831 puts( ERROR_dictionary("hello all") ); |
|
832 return( EXIT_SUCCESS ); |
|
833 } |
|
834 |
|
835 example% msgcpp -D__STDC__ -D__i386 hello.c hello.mso |
|
836 |
|
837 example% cat hello.mso |
|
838 str "hello world" |
|
839 str "hello all" |
|
840 .fi |
|
841 .in -2 |
|
842 .sp |
|
843 |
|
844 .SH AUTHORS |
|
845 .sp |
|
846 .LP |
|
847 Glenn Fowler, \[email protected]\fR |
|
848 .SH ATTRIBUTES |
|
849 .sp |
|
850 .LP |
|
851 See \fBattributes\fR(5) for descriptions of the following attributes: |
|
852 .sp |
|
853 |
|
854 .sp |
|
855 .TS |
|
856 tab() box; |
|
857 cw(2.75i) |cw(2.75i) |
|
858 lw(2.75i) |lw(2.75i) |
|
859 . |
|
860 ATTRIBUTE TYPEATTRIBUTE VALUE |
|
861 _ |
|
862 Availabilitydeveloper/astdev |
|
863 _ |
|
864 Interface StabilityVolatile |
|
865 .TE |
|
866 |
|
867 .SH SEE ALSO |
|
868 .sp |
|
869 .LP |
|
870 \fBcpp\fR(1), \fBgencat\fR(1), \fBmsgcc\fR(1), \fBmsgcvt\fR(1), \fBmsggen\fR(1), \fBmake\fR(1S), \fBattributes\fR(5) |
|
871 .sp |
|
872 .LP |
|
873 Kernighan, Brian W. and Ritchie, Dennis M., \fIThe C Programming Language\fR, Prentice Hall, 1988. |