]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man1p/gencat.1p
Import of man-pages 1.70
[thirdparty/man-pages.git] / man1p / gencat.1p
1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "GENCAT" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
3 .\" gencat
4 .SH NAME
5 gencat \- generate a formatted message catalog
6 .SH SYNOPSIS
7 .LP
8 \fBgencat\fP \fIcatfile msgfile\fP\fB... \fP
9 .SH DESCRIPTION
10 .LP
11 The \fIgencat\fP utility shall merge the message text source file
12 \fImsgfile\fP into a formatted message catalog
13 \fIcatfile\fP. The file \fIcatfile\fP shall be created if it does
14 not already exist. If \fIcatfile\fP does exist, its messages
15 shall be included in the new \fIcatfile\fP. If set and message numbers
16 collide, the new message text defined in \fImsgfile\fP
17 shall replace the old message text currently contained in \fIcatfile\fP.
18 .SH OPTIONS
19 .LP
20 None.
21 .SH OPERANDS
22 .LP
23 The following operands shall be supported:
24 .TP 7
25 \fIcatfile\fP
26 A pathname of the formatted message catalog. If \fB'-'\fP is specified,
27 standard output shall be used. The format of the
28 message catalog produced is unspecified.
29 .TP 7
30 \fImsgfile\fP
31 A pathname of a message text source file. If \fB'-'\fP is specified
32 for an instance of \fImsgfile\fP, standard input shall
33 be used. The format of message text source files is defined in the
34 EXTENDED DESCRIPTION section.
35 .sp
36 .SH STDIN
37 .LP
38 The standard input shall not be used unless a \fImsgfile\fP operand
39 is specified as \fB'-'\fP .
40 .SH INPUT FILES
41 .LP
42 The input files shall be text files.
43 .SH ENVIRONMENT VARIABLES
44 .LP
45 The following environment variables shall affect the execution of
46 \fIgencat\fP:
47 .TP 7
48 \fILANG\fP
49 Provide a default value for the internationalization variables that
50 are unset or null. (See the Base Definitions volume of
51 IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
52 for
53 the precedence of internationalization variables used to determine
54 the values of locale categories.)
55 .TP 7
56 \fILC_ALL\fP
57 If set to a non-empty string value, override the values of all the
58 other internationalization variables.
59 .TP 7
60 \fILC_CTYPE\fP
61 Determine the locale for the interpretation of sequences of bytes
62 of text data as characters (for example, single-byte as
63 opposed to multi-byte characters in arguments and input files).
64 .TP 7
65 \fILC_MESSAGES\fP
66 Determine the locale that should be used to affect the format and
67 contents of diagnostic messages written to standard
68 error.
69 .TP 7
70 \fINLSPATH\fP
71 Determine the location of message catalogs for the processing of \fILC_MESSAGES
72 \&.\fP
73 .sp
74 .SH ASYNCHRONOUS EVENTS
75 .LP
76 Default.
77 .SH STDOUT
78 .LP
79 The standard output shall not be used unless the \fIcatfile\fP operand
80 is specified as \fB'-'\fP .
81 .SH STDERR
82 .LP
83 The standard error shall be used only for diagnostic messages.
84 .SH OUTPUT FILES
85 .LP
86 None.
87 .SH EXTENDED DESCRIPTION
88 .LP
89 The content of a message text file shall be in the format defined
90 as follows. Note that the fields of a message text source line
91 are separated by a single <blank>. Any other <blank>s are considered
92 to be part of the subsequent field.
93 .TP 7
94 \fB$set\ \fP \fIn\ comment\fP
95 .sp
96 This line specifies the set identifier of the following messages until
97 the next \fB$set\fP or end-of-file appears. The \fIn\fP
98 denotes the set identifier, which is defined as a number in the range
99 [1, {NL_SETMAX}] (see the \fI<limits.h>\fP header defined in the Base
100 Definitions volume of
101 IEEE\ Std\ 1003.1-2001). The application shall ensure that set identifiers
102 are presented in ascending order within a single
103 source file, but need not be contiguous. Any string following the
104 set identifier shall be treated as a comment. If no \fB$set\fP
105 directive is specified in a message text source file, all messages
106 shall be located in an implementation-defined default message
107 set NL_SETD (see the \fI<nl_types.h>\fP header defined in the Base
108 Definitions
109 volume of IEEE\ Std\ 1003.1-2001).
110 .TP 7
111 \fB$delset\ \fP \fIn\ comment\fP
112 .sp
113 This line deletes message set \fIn\fP from an existing message catalog.
114 The \fIn\fP denotes the set number [1, {NL_SETMAX}]. Any
115 string following the set number shall be treated as a comment.
116 .TP 7
117 \fB$\ \fP \fIcomment\fP
118 A line beginning with \fB'$'\fP followed by a <blank> shall be treated
119 as a comment.
120 .TP 7
121 \fIm\ message-text\fP
122 .sp
123 The \fIm\fP denotes the message identifier, which is defined as a
124 number in the range [1, {NL_MSGMAX}] (see the \fI<limits.h>\fP header).
125 The \fImessage-text\fP shall be stored in the message catalog
126 with the set identifier specified by the last \fB$set\fP directive,
127 and with message identifier \fIm\fP. If the
128 \fImessage-text\fP is empty, and a <blank> field separator is present,
129 an empty string shall be stored in the message
130 catalog. If a message source line has a message number, but neither
131 a field separator nor \fImessage-text\fP, the existing message
132 with that number (if any) shall be deleted from the catalog. The application
133 shall ensure that message identifiers are in ascending
134 order within a single set, but need not be contiguous. The application
135 shall ensure that the length of \fImessage-text\fP is in
136 the range [0, {NL_TEXTMAX}] (see the \fI<limits.h>\fP header).
137 .TP 7
138 \fB$quote\ \fP \fIn\fP
139 This line specifies an optional quote character \fIc\fP, which can
140 be used to surround \fImessage-text\fP so that trailing
141 spaces or null (empty) messages are visible in a message source line.
142 By default, or if an empty \fB$quote\fP directive is
143 supplied, no quoting of \fImessage-text\fP shall be recognized.
144 .sp
145 .LP
146 Empty lines in a message text source file shall be ignored. The effects
147 of lines starting with any character other than those
148 defined above are implementation-defined.
149 .LP
150 Text strings can contain the special characters and escape sequences
151 defined in the following table:
152 .TS C
153 center; l l l.
154 \fBDescription\fP \fBSymbol\fP \fBSequence\fP
155 <newline> NL(LF) \\n
156 Horizontal-tab HT \\t
157 <vertical-tab> VT \\v
158 <backspace> BS \\b
159 <carriage-return> CR \\r
160 <form-feed> FF \\f
161 Backslash \fB\\\fP \\\\
162 Bit pattern \fBddd\fP \\ddd
163 .TE
164 .LP
165 The escape sequence \fB"\\ddd"\fP consists of backslash followed by
166 one, two, or three octal digits, which shall be taken to
167 specify the value of the desired character. If the character following
168 a backslash is not one of those specified, the backslash
169 shall be ignored.
170 .LP
171 Backslash ( \fB'\\'\fP ) followed by a <newline> is also used to continue
172 a string on the following line. Thus, the
173 following two lines describe a single message string:
174 .sp
175 .RS
176 .nf
177
178 \fB1 This line continues \\
179 to the next line
180 \fP
181 .fi
182 .RE
183 .LP
184 which shall be equivalent to:
185 .sp
186 .RS
187 .nf
188
189 \fB1 This line continues to the next line
190 \fP
191 .fi
192 .RE
193 .SH EXIT STATUS
194 .LP
195 The following exit values shall be returned:
196 .TP 7
197 \ 0
198 Successful completion.
199 .TP 7
200 >0
201 An error occurred.
202 .sp
203 .SH CONSEQUENCES OF ERRORS
204 .LP
205 Default.
206 .LP
207 \fIThe following sections are informative.\fP
208 .SH APPLICATION USAGE
209 .LP
210 Message catalogs produced by \fIgencat\fP are binary encoded, meaning
211 that their portability cannot be guaranteed between
212 different types of machine. Thus, just as C programs need to be recompiled
213 for each type of machine, so message catalogs must be
214 recreated via \fIgencat\fP.
215 .SH EXAMPLES
216 .LP
217 None.
218 .SH RATIONALE
219 .LP
220 None.
221 .SH FUTURE DIRECTIONS
222 .LP
223 None.
224 .SH SEE ALSO
225 .LP
226 \fIiconv\fP() , the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
227 \fI<limits.h>\fP, \fI<nl_types.h>\fP
228 .SH COPYRIGHT
229 Portions of this text are reprinted and reproduced in electronic form
230 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
231 -- Portable Operating System Interface (POSIX), The Open Group Base
232 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
233 Electrical and Electronics Engineers, Inc and The Open Group. In the
234 event of any discrepancy between this version and the original IEEE and
235 The Open Group Standard, the original IEEE and The Open Group Standard
236 is the referee document. The original Standard can be obtained online at
237 http://www.opengroup.org/unix/online.html .