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

NAME

6       gencat - generate a formatted message catalog
7

SYNOPSIS

9       gencat catfile msgfile...
10

DESCRIPTION

12       The  gencat  utility  shall  merge the message text source file msgfile
13       into a formatted message catalog catfile. The  file  catfile  shall  be
14       created  if  it does not already exist. If catfile does exist, its mes‐
15       sages shall be included in the new catfile. If set and message  numbers
16       collide,  the new message text defined in msgfile shall replace the old
17       message text currently contained in catfile.
18

OPTIONS

20       None.
21

OPERANDS

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

STDIN

38       The standard input shall not be used unless a msgfile operand is speci‐
39       fied as '-' .
40

INPUT FILES

42       The input files shall be text files.
43

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

72       Default.
73

STDOUT

75       The standard output shall not be used unless  the  catfile  operand  is
76       specified as '-' .
77

STDERR

79       The standard error shall be used only for diagnostic messages.
80

OUTPUT FILES

82       None.
83

EXTENDED DESCRIPTION

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

EXIT STATUS

176       The following exit values shall be returned:
177
178        0     Successful completion.
179
180       >0     An error occurred.
181
182

CONSEQUENCES OF ERRORS

184       Default.
185
186       The following sections are informative.
187

APPLICATION USAGE

189       Message  catalogs  produced  by gencat are binary encoded, meaning that
190       their portability cannot  be  guaranteed  between  different  types  of
191       machine.  Thus,  just as C programs need to be recompiled for each type
192       of machine, so message catalogs must be recreated via gencat.
193

EXAMPLES

195       None.
196

RATIONALE

198       None.
199

FUTURE DIRECTIONS

201       None.
202

SEE ALSO

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