2 .\" Copyright (c) 2000-2007 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 MSGCC 1 "Oct 9, 2007"
7 msgcc \- C language message catalog compiler
11 \fBmsgcc\fR [\fB-M-\fR\fIoption\fR] [\fBcc-options\fR\fIoption\fR] \fIfile...\fR
17 \fBmsgcc\fR is a C language message catalog compiler. It accepts \fBcc\fR style
18 options and arguments.
21 A \fBmsgcpp\fR(1) \fB\&.mso\fR file is generated for each input \fB\&.c\fR
22 file. If the \fB-c\fR option is not specified then a \fBgencat\fR(1)
23 format .\fBmsg\fR file is generated from the input \fB\&.mso\fR and \fB\&.msg\fR
24 files. If \fB-c\fR is not specified then a \fB\&.msg\fR suffix is appended to
25 the \fB-o\fR file if it doesn't already have a suffix. The default output is
26 \fBa.out.msg\fR if \fB-c\fR and \fB-o\fR are not specified.
29 If \fB-M-new\fR is not specified then messages are merged with those in the
30 pre-existing \fB-o\fR file.
34 The following options are supported:
38 \fB\fIcc-options\fR\fR
41 Specify \fBcc\fR style options and arguments.
47 \fB\fB-M-\fR\fIoption\fR\fR
50 Set a \fBmsgcc\fR option.
52 Specify option as one of the following:
59 The \fB-o\fR file is assumed to be in \fBmkmsgs\fR(1) format.
68 Create a new \fB-o\fR file.
77 Messages in the \fB-o\fR file that are not in new \fB\&.msg\fR file arguments
78 are preserved. The default is to either reuse the message numbers with new
79 message text that is similar to the old or to delete the message text, leaving
80 an unused message number.
86 \fB\fBset=\fR\fInumber\fR\fR
89 Set the message set number to \fInumber\fR. The default is \fB1\fR.
95 \fB\fBsimilar=\fR\fInumber\fR\fR
98 The message text similarity message threshold. The similarity measure between
99 old and new message text is:
103 100*(2*gzip(\fIold\fR+\fInew\fR)\e
104 /(gzip(\fIold\fR)+gzip(\fInew\fR))-1)
109 where \fBgzip(\fR\fIx\fR\fB)\fR is the size of text \fIx\fR when compressed by
110 \fBgzip\fR. The default threshold is \fB$__similar__$.A\fR threshold of \fB0\fR
111 turns off message replacement, but unused old messages are still deleted. Use
112 \fB-M-preserve\fR to preserve all old messages.
121 Trace similar message replacements on the standard error.
129 The following operands are supported:
136 Specifies the name of the file on which \fBmsgcc\fR operates.
146 Successful completion.
160 \fBExample 1 \fRUsing \fBmsgcc\fR
163 The following example uses \fBmsgcc\fR to extract localizable strings from the
164 file \fBhello.c\fR, marked using \fBERROR_dictionary()\fR, writes them to the
165 file \fBhello.mso\fR, and creates a \fBgencat\fR format \fBxxx.msg\fR file:
176 * dummy macro to avoid including
179 #define ERROR_dictionary(x) x
181 int main(int ac, char *av[])
183 puts( ERROR_dictionary("hello world") );
184 return( EXIT_SUCCESS );
187 example% msgcc -o xxx -D__STDC__ -D__i386 hello.c
189 example% cat hello.mso
193 $ xxx message catalog
194 $translation msgcc 2007-09-25
205 Glenn Fowler, \fBgsf@research.att.com\fR
209 See \fBattributes\fR(5) for descriptions of the following attributes:
217 ATTRIBUTE TYPE ATTRIBUTE VALUE
219 Interface Stability Volatile
225 \fBcpp\fR(1), \fBgencat\fR(1), \fBmkmsgs\fR(1), \fBmsggen\fR(1),
226 \fBmsgcpp\fR(1), \fBmsgcvt\fR(1), \fBattributes\fR(5)