2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document. The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
25 .\" This notice shall appear on any product containing this material.
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
43 .\" Copyright 1989 AT&T
44 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
45 .\" Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved.
47 .TH GENCAT 1 "Feb 1, 1995"
49 gencat \- generate a formatted message catalog
53 \fBgencat\fR \fIcatfile\fR \fImsgfile\fR...
59 The \fBgencat\fR command merges the message text source file(s) \fImsgfile\fR
60 into a formatted message database \fIcatfile\fR. The database \fIcatfile\fR is
61 created if it does not already exist. If \fIcatfile\fR does exist, its
62 messages are included in the new \fIcatfile\fR. If set and message numbers
63 collide, the new message-text defined in \fImsgfile\fR replaces the old message
64 text currently contained in \fIcatfile\fR. The message text source file (or set
65 of files) input to \fBgencat\fR can contain either set and message numbers or
66 simply message numbers, in which case the set \fBNL_SETD\fR (see
67 \fBnl_types.h\fR(3HEAD)) is assumed.
68 .SS "Message Text Source File Format"
71 The format of a message text source file is defined as follows. Note that the
72 fields of a message text source line are separated by a single \fBASCII\fR
73 space or tab character. Any other \fBASCII\fR spaces or tabs are considered as
74 part of the subsequent field.
78 \fB\fB$set\fR \fIn comment\fR \fR
81 Where \fIn\fR specifies the set identifier of the following messages until the
82 next \fB$set\fR, \fB$delset\fR, or end-of-file appears. \fIn\fR must be a
83 number in the range (\fB1\fR-{\fBNL_SETMAX\fR}). Set identifiers within a
84 single source file need not be contiguous. Any string following the set
85 identifier is treated as a comment. If no \fB$set\fR directive is specified in
86 a message text source file, all messages are located in the default message set
93 \fB\fB$delset\fR \fIn comment\fR \fR
96 Deletes message set \fIn\fR from an existing message catalog. Any string
97 following the set number is treated as a comment. (\fBNote:\fR if \fIn\fR is
98 not a valid set it is ignored.)
104 \fB\fB$\fR\fIcomment\fR \fR
107 A line beginning with a dollar symbol \fB$\fR followed by an \fBASCII\fR space
108 or tab character is treated as a comment.
114 \fB\fIm\fR \fImessage-text\fR \fR
117 The \fIm\fR denotes the message identifier, a number in the range
118 (\fB1\fR-{\fBNL_MSGMAX\fR}). The \fImessage-text\fR is stored in the message
119 catalog with the set identifier specified by the last \fB$set\fR directive, and
120 with message identifier \fIm\fR. If the \fImessage-text\fR is empty, and an
121 \fBASCII\fR space or tab field separator is present, an empty string is stored
122 in the message catalog. If a message source line has a message number, but
123 neither a field separator nor \fImessage-text\fR, the existing message with
124 that number (if any) is deleted from the catalog. Message identifiers need not
125 be contiguous. The length of \fImessage-text\fR must be in the range
126 (\fB0\fR-{\fBNL_TEXTMAX\fR}).
132 \fB\fB$quote\fR \fIc\fR \fR
135 This line specifies an optional quote character \fIc\fR, which can be used to
136 surround \fImessage-text\fR so that trailing spaces or null (empty) messages
137 are visible in a message source line. By default, or if an empty \fB$quote\fR
138 directive is supplied, no quoting of \fImessage-text\fR will be recognized.
143 Empty lines in a message text source file are ignored.
146 Text strings can contain the special characters and escape sequences defined in
155 Description Symbol Sequence
157 horizontal tab HT \et
160 carriage return CR \er
163 bit pattern ddd \eddd
168 The escape sequence \fB\e\fR\fIddd\fR consists of backslash followed by 1, 2 or
169 3 octal digits, which are taken to specify the value of the desired character.
170 If the character following a backslash is not one of those specified, the
171 backslash is ignored.
174 Backslash followed by an \fBASCII\fR newline character is also used to continue
175 a string on the following line. Thus, the following two lines describe a single
180 1 This line continues \e
187 which is equivalent to:
191 1 This line continues to the next line
198 The following operands are supported:
205 A path name of the formatted message catalog. If \(mi is specified, standard
215 A path name of a message text source file. If \(mi is specified for an instance
216 of \fImsgfile\fR, standard input is used. The format of message text source
217 files is defined in \fBMessage Text Source File Format\fR.
220 .SH ENVIRONMENT VARIABLES
223 See \fBenviron\fR(5) for descriptions of the following environment variables
224 that affect the execution of \fBgencat\fR: \fBLANG\fR, \fBLC_ALL\fR,
225 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
229 The following exit values are returned:
236 Successful completion.
251 See \fBattributes\fR(5) for descriptions of the following attributes:
259 ATTRIBUTE TYPE ATTRIBUTE VALUE
263 Interface Stability Standard
269 \fBmkmsgs\fR(1), \fBcatgets\fR(3C), \fBcatopen\fR(3C), \fBgettxt\fR(3C),
270 \fBnl_types.h\fR(3HEAD), \fBattributes\fR(5), \fBenviron\fR(5),