summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/msggen.1
blob: 0ae5cf528300c435b3722601e0b6d0587c0c8f0c (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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
'\" te
.\" Copyright (c) 2000-2007 AT&T Knowledge Ventures
.\" To view license terms, see http://www.opensource.org/licenses/cpl1.0.txt
.\" Portions Copyright (c) 2007, Sun Microsystems, Inc.
.TH MSGGEN 1 "Oct 9, 2007"
.SH NAME
msggen \- generate a machine independent formatted message catalog
.SH SYNOPSIS
.LP
.nf
\fBmsggen\fR [\fB-fls\fR] \fIcatfile\fR [\fImsgfile\fR]
.fi

.SH DESCRIPTION
.sp
.LP
\fBmsggen\fR merges the message text source file \fImsgfile\fR into a machine
independent formatted message catalog \fIcatfile\fR. The file \fIcatfile\fR is
created if it does not already exist. If \fIcatfile\fR does exist, its messages
are included in the new \fIcatfile\fR. If set and message numbers collide, the
new message text defined in \fImsgfile\fR replaces the old message text
currently contained in \fIcatfile\fR.
.sp
.LP
Non-ASCII characters must be UTF-8 encoded. \fBiconv\fR(1) can be used to
convert to/from UTF-8.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.br
.na
\fB\fB--format\fR\fR
.ad
.RS 12n
List the \fBprintf\fR(3C) format signature for each message in \fIcatfile\fR. A
format signature is one line containing one character for each format
specification:
.sp
.ne 2
.na
\fB\fBc\fR\fR
.ad
.RS 5n
char
.RE

.sp
.ne 2
.na
\fB\fBd\fR\fR
.ad
.RS 5n
double
.RE

.sp
.ne 2
.na
\fB\fBD\fR\fR
.ad
.RS 5n
long double
.RE

.sp
.ne 2
.na
\fB\fBf\fR\fR
.ad
.RS 5n
float
.RE

.sp
.ne 2
.na
\fB\fBh\fR\fR
.ad
.RS 5n
short
.RE

.sp
.ne 2
.na
\fB\fBi\fR\fR
.ad
.RS 5n
int
.RE

.sp
.ne 2
.na
\fB\fBj\fR\fR
.ad
.RS 5n
long long
.RE

.sp
.ne 2
.na
\fB\fBl\fR\fR
.ad
.RS 5n
long
.RE

.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.RS 5n
void*
.RE

.sp
.ne 2
.na
\fB\fBs\fR\fR
.ad
.RS 5n
string
.RE

.sp
.ne 2
.na
\fB\fBt\fR\fR
.ad
.RS 5n
ptrdiff_t
.RE

.sp
.ne 2
.na
\fB\fBz\fR\fR
.ad
.RS 5n
size_t
.RE

.sp
.ne 2
.na
\fB\fB?\fR\fR
.ad
.RS 5n
unknown
.RE

.RE

.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.br
.na
\fB\fB--list\fR\fR
.ad
.RS 12n
List \fIcatfile\fR in UTF-8 msgfile form.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.br
.na
\fB\fB--set\fR\fR
.ad
.RS 12n
Convert the \fIcatfile\fR to a message set number and print the number on the
standard output.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcatfile\fR\fR
.ad
.RS 11n
Machine independent formatted message catalog file.
.RE

.sp
.ne 2
.na
\fB\fImsgfile\fR\fR
.ad
.RS 11n
Message text source file.
.RE

.SH USAGE
.sp
.LP
Message text source files are in \fBgencat\fR(1) format, defined as follows.
The fields of a message text source line are separated by a single blank
character. Any other blank characters are considered to be part of the
subsequent field. The \fBNL_*\fR constants are defined in one or both of
\fB<limits.h>\fR and \fB<nl_types.h>\fR\&.
.sp
.ne 2
.na
\fB\fB$\fR \fIcomment\fR\fR
.ad
.sp .6
.RS 4n
A line beginning with a \fB$\fR followed by a blank character is treated as a
comment.
.RE

.sp
.ne 2
.na
\fB\fB$delset\fR \fIn comment\fR\fR
.ad
.sp .6
.RS 4n
This line deletes message set \fIn\fR from an existing message catalog. \fIn\fR
denotes the set number \fB[1, NL_SETMAX]\fR. Any text following the set number
is treated as a comment.
.RE

.sp
.ne 2
.na
\fB\fB$quote\fR \fIc\fR\fR
.ad
.sp .6
.RS 4n
This line specifies an optional quote character \fIc\fR, which can be used to
surround message-text so that trailing spaces or empty messages are visible in
a message source line. By default, or if an empty \fB$quote\fR directive is
supplied, no quoting of message-text is recognized.
.RE

.sp
.ne 2
.na
\fB\fB$set\fR \fIn comment\fR\fR
.ad
.sp .6
.RS 4n
This line specifies the set identifier of the following messages until the next
\fB$set\fR or end-of-file (\fBEOF\fR) appears. \fIn\fR denotes the set
identifier, which is defined as a number in the range \fB[1, NL_SETMAX]\fR. Set
numbers need not be contiguous. Any text following the set identifier is
treated as a comment. If no \fB$set\fR directive is specified in a message text
source file, all messages are located in message set 1.
.RE

.sp
.ne 2
.na
\fB\fB$translation\fR \fIidentification YYYY-MM-DD\fR\fB[,...]\fR\fR
.ad
.sp .6
.RS 4n
Append translation information to the message catalog header. Only the newest
date for a given identification is retained in the catalog. Multiple
translation lines are combined into a single, comma-separated list.
.RE

.sp
.ne 2
.na
\fB\fBm\fR \fImessage-text\fR\fR
.ad
.sp .6
.RS 4n
\fBm\fR denotes the message identifier, which is defined as a number in the
range \fB[1, NL_MSGMAX]\fR. The message-text is stored in the message catalogue
with the set identifier specified by the last \fB$set\fR directive, and with
message identifier \fBm\fR. If the message-text is empty, and a blank character
field separator is present, an empty string is stored in the message catalogue.
If a message source line has a message number, but neither a field separator
nor message-text, the existing message with that number (if any) is deleted
from the catalogue. Message identifiers need not be contiguous. There are no
\fImessage-text\fR length restrictions.
.RE

.SH EXIT STATUS
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
One or more specified jobs does not exist.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRUsing \fBmsggen\fR
.sp
.LP
The following example generates a message catalog \fBxxx\fR from the message
file \fBxxx.msg\fR:

.sp
.in +2
.nf
example% msggen xxx xxx.msg
.fi
.in -2
.sp

.SH AUTHORS
.sp
.LP
Glenn Fowler, \fBgsf@research.att.com\fR
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Volatile
.TE

.SH SEE ALSO
.sp
.LP
.BR gencat (1),
.BR iconv (1),
.BR msgcc (1),
.BR printf (3C),
.BR attributes (7)