1msgcc(1)                         User Commands                        msgcc(1)
2
3
4

NAME

6       msgcc - C language message catalog compiler
7

SYNOPSIS

9       msgcc [-M-option] [cc-optionsoption] file...
10
11

DESCRIPTION

13       msgcc  is  a  C  language message catalog compiler. It accepts cc style
14       options and arguments.
15
16
17       A msgcpp(1) .mso file is generated for each input .c file.  If  the  -c
18       option  is not specified then a gencat(1) format .msg file is generated
19       from the input .mso and .msg files. If -c is not specified then a  .msg
20       suffix  is appended to the -o file if it doesn't already have a suffix.
21       The default output is a.out.msg if -c and -o are not specified.
22
23
24       If -M-new is not specified then messages are merged with those  in  the
25       pre-existing -o file.
26

OPTIONS

28       The following options are supported:
29
30       cc-options    Specify cc style options and arguments.
31
32
33       -M-option     Set a msgcc option.
34
35                     Specify option as one of the following:
36
37                     mkmsgs            The   -o  file  is  assumed  to  be  in
38                                       mkmsgs(1) format.
39
40
41                     new               Create a new -o file.
42
43
44                     preserve          Messages in the -o file that are not in
45                                       new  .msg file arguments are preserved.
46                                       The default is to either reuse the mes‐
47                                       sage numbers with new message text that
48                                       is similar to the old or to delete  the
49                                       message text, leaving an unused message
50                                       number.
51
52
53                     set=number        Set the message set number  to  number.
54                                       The default is 1.
55
56
57                     similar=number    The  message  text  similarity  message
58                                       threshold.   The   similarity   measure
59                                       between old and new message text is:
60
61                                         100*(2*gzip(old+new)\
62                                              /(gzip(old)+gzip(new))-1)
63
64
65                                       where  gzip(x)  is  the  size of text x
66                                       when compressed by  gzip.  The  default
67                                       threshold  is $__similar__$.A threshold
68                                       of 0 turns off message replacement, but
69                                       unused  old messages are still deleted.
70                                       Use -M-preserve  to  preserve  all  old
71                                       messages.
72
73
74                     verbose           Trace  similar  message replacements on
75                                       the standard error.
76
77
78

OPERANDS

80       The following operands are supported:
81
82       file    Specifies the name of the file on which msgcc operates.
83
84

EXIT STATUS

86       0     Successful completion.
87
88
89       >0    An error occurred.
90
91

EXAMPLES

93       Example 1 Using msgcc
94
95
96       The following example uses msgcc to extract  localizable  strings  from
97       the  file  hello.c, marked using ERROR_dictionary(), writes them to the
98       file hello.mso, and creates a gencat format xxx.msg file:
99
100
101         example% cat hello.c
102
103         #include <stdio.h>
104         #include <stdlib.h>
105
106         /*
107          * dummy macro to avoid including
108          * libast headers
109          */
110         #define ERROR_dictionary(x) x
111
112         int main(int ac, char *av[])
113         {
114                 puts( ERROR_dictionary("hello world") );
115                 return( EXIT_SUCCESS );
116         }
117
118         example% msgcc -o xxx -D__STDC__ -D__i386 hello.c
119
120         example% cat hello.mso
121         str "hello world"
122
123         example% cat xxx.msg
124         $ xxx message catalog
125         $translation msgcc 2007-09-25
126         $set 1
127         $quote "
128         1 "hello world"
129
130
131

AUTHORS

133       Glenn Fowler, gsf@research.att.com
134

ATTRIBUTES

136       See attributes(5) for descriptions of the following attributes:
137
138
139
140
141       ┌─────────────────────────────┬─────────────────────────────┐
142       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
143       ├─────────────────────────────┼─────────────────────────────┤
144       │Availability                 │SUNWastdev                   │
145       ├─────────────────────────────┼─────────────────────────────┤
146       │Interface Stability          │Volatile                     │
147       └─────────────────────────────┴─────────────────────────────┘
148

SEE ALSO

150       cpp(1),  gencat(1),   mkmsgs(1),   msggen(1),   msgcpp(1),   msgcvt(1),
151       attributes(5)
152
153
154
155SunOS 5.11                        9 Oct 2007                          msgcc(1)
Impressum