1GENCAT(1P)                 POSIX Programmer's Manual                GENCAT(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       gencat - generate a formatted message catalog
13

SYNOPSIS

15       gencat catfile msgfile...
16

DESCRIPTION

18       The gencat utility shall merge the message  text  source  file  msgfile
19       into  a  formatted  message  catalog catfile. The file catfile shall be
20       created if it does not already exist. If catfile does exist,  its  mes‐
21       sages  shall be included in the new catfile. If set and message numbers
22       collide, the new message text defined in msgfile shall replace the  old
23       message text currently contained in catfile.
24

OPTIONS

26       None.
27

OPERANDS

29       The following operands shall be supported:
30
31       catfile
32              A  pathname  of  the formatted message catalog. If '-' is speci‐
33              fied, standard output shall be used. The format of  the  message
34              catalog produced is unspecified.
35
36       msgfile
37              A  pathname  of  a message text source file. If '-' is specified
38              for an instance of msgfile, standard input shall  be  used.  The
39              format  of  message text source files is defined in the EXTENDED
40              DESCRIPTION section.
41
42

STDIN

44       The standard input shall not be used unless a msgfile operand is speci‐
45       fied as '-' .
46

INPUT FILES

48       The input files shall be text files.
49

ENVIRONMENT VARIABLES

51       The  following environment variables shall affect the execution of gen‐
52       cat:
53
54       LANG   Provide a default value for the  internationalization  variables
55              that  are  unset  or  null.  (See the Base Definitions volume of
56              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
57              ables  for the precedence of internationalization variables used
58              to determine the values of locale categories.)
59
60       LC_ALL If set to a non-empty string value, override the values  of  all
61              the other internationalization variables.
62
63       LC_CTYPE
64              Determine  the  locale  for  the  interpretation of sequences of
65              bytes of text data as characters (for  example,  single-byte  as
66              opposed to multi-byte characters in arguments and input files).
67
68       LC_MESSAGES
69              Determine  the  locale  that should be used to affect the format
70              and contents of diagnostic messages written to standard error.
71
72       NLSPATH
73              Determine the location of message catalogs for the processing of
74              LC_MESSAGES .
75
76

ASYNCHRONOUS EVENTS

78       Default.
79

STDOUT

81       The  standard  output  shall  not be used unless the catfile operand is
82       specified as '-' .
83

STDERR

85       The standard error shall be used only for diagnostic messages.
86

OUTPUT FILES

88       None.
89

EXTENDED DESCRIPTION

91       The content of a message text file shall be in the  format  defined  as
92       follows.  Note  that the fields of a message text source line are sepa‐
93       rated by a single <blank>. Any other <blank>s are considered to be part
94       of the subsequent field.
95
96       $set  n comment
97
98              This line specifies the set identifier of the following messages
99              until the next $set or end-of-file appears. The  n  denotes  the
100              set  identifier,  which  is defined as a number in the range [1,
101              {NL_SETMAX}] (see the <limits.h> header defined in the Base Def‐
102              initions  volume of IEEE Std 1003.1-2001). The application shall
103              ensure that set identifiers are  presented  in  ascending  order
104              within  a  single  source  file, but need not be contiguous. Any
105              string following the set identifier shall be treated as  a  com‐
106              ment. If no $set directive is specified in a message text source
107              file, all messages shall be located in an implementation-defined
108              default message set NL_SETD (see the <nl_types.h> header defined
109              in the Base Definitions volume of IEEE Std 1003.1-2001).
110
111       $delset  n comment
112
113              This line deletes message set n from an existing  message  cata‐
114              log.   The n denotes the set number [1, {NL_SETMAX}]. Any string
115              following the set number shall be treated as a comment.
116
117       $  comment
118              A line beginning with '$' followed by a <blank> shall be treated
119              as a comment.
120
121       m message-text
122
123              The m denotes the message identifier, which is defined as a num‐
124              ber in the range [1, {NL_MSGMAX}] (see the  <limits.h>  header).
125              The message-text shall be stored in the message catalog with the
126              set identifier specified by the last $set  directive,  and  with
127              message  identifier  m.  If  the  message-text  is  empty, and a
128              <blank> field separator is present, an  empty  string  shall  be
129              stored  in  the  message catalog. If a message source line has a
130              message number, but neither a field separator nor  message-text,
131              the  existing message with that number (if any) shall be deleted
132              from the catalog. The  application  shall  ensure  that  message
133              identifiers are in ascending order within a single set, but need
134              not be contiguous. The application shall ensure that the  length
135              of message-text is in the range [0, {NL_TEXTMAX}] (see the <lim‐
136              its.h> header).
137
138       $quote  n
139              This line specifies an optional quote character c, which can  be
140              used  to  surround  message-text so that trailing spaces or null
141              (empty) messages are visible  in  a  message  source  line.   By
142              default, or if an empty $quote directive is supplied, no quoting
143              of message-text shall be recognized.
144
145
146       Empty lines in a message text source file shall be ignored. The effects
147       of lines starting with any character other than those defined above are
148       implementation-defined.
149
150       Text strings can contain the special characters  and  escape  sequences
151       defined in the following table:
152
153                        Description         Symbol   Sequence
154                        <newline>           NL(LF)   \n
155                        Horizontal-tab      HT       \t
156                        <vertical-tab>      VT       \v
157                        <backspace>         BS       \b
158                        <carriage-return>   CR       \r
159                        <form-feed>         FF       \f
160                        Backslash           \        \\
161                        Bit pattern         ddd      \ddd
162
163       The  escape sequence "\ddd" consists of backslash followed by one, two,
164       or three octal digits, which shall be taken to specify the value of the
165       desired character. If the character following a backslash is not one of
166       those specified, the backslash shall be ignored.
167
168       Backslash ( '\' ) followed by a <newline> is also used  to  continue  a
169       string  on the following line. Thus, the following two lines describe a
170       single message string:
171
172
173              1 This line continues \
174              to the next line
175
176       which shall be equivalent to:
177
178
179              1 This line continues to the next line
180

EXIT STATUS

182       The following exit values shall be returned:
183
184        0     Successful completion.
185
186       >0     An error occurred.
187
188

CONSEQUENCES OF ERRORS

190       Default.
191
192       The following sections are informative.
193

APPLICATION USAGE

195       Message catalogs produced by gencat are binary  encoded,  meaning  that
196       their  portability  cannot  be  guaranteed  between  different types of
197       machine. Thus, just as C programs need to be recompiled for  each  type
198       of machine, so message catalogs must be recreated via gencat.
199

EXAMPLES

201       None.
202

RATIONALE

204       None.
205

FUTURE DIRECTIONS

207       None.
208

SEE ALSO

210       iconv(),  the  Base  Definitions  volume of IEEE Std 1003.1-2001, <lim‐
211       its.h>, <nl_types.h>
212
214       Portions of this text are reprinted and reproduced in  electronic  form
215       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
216       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
217       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
218       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
219       event of any discrepancy between this version and the original IEEE and
220       The Open Group Standard, the original IEEE and The Open Group  Standard
221       is  the  referee document. The original Standard can be obtained online
222       at http://www.opengroup.org/unix/online.html .
223
224
225
226IEEE/The Open Group                  2003                           GENCAT(1P)
Impressum