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   A pathname of the formatted message catalog. If '-' is speci‐
32                 fied, standard output shall be used. The format of  the  mes‐
33                 sage catalog produced is unspecified.
34
35       msgfile   A pathname of a message text source file. If '-' is specified
36                 for an instance of msgfile, standard input shall be used. The
37                 format  of  message  text  source  files  is  defined  in the
38                 EXTENDED DESCRIPTION section.
39

STDIN

41       The standard input shall not be used unless a msgfile operand is speci‐
42       fied as '-'.
43

INPUT FILES

45       The input files shall be text files.
46

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

74       Default.
75

STDOUT

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

STDERR

81       The standard error shall be used only for diagnostic messages.
82

OUTPUT FILES

84       None.
85

EXTENDED DESCRIPTION

87       The content of a message text file shall be in the  format  defined  as
88       follows.  Note  that the fields of a message text source line are sepa‐
89       rated by a single <blank> character. Any other <blank>  characters  are
90       considered to be part of the subsequent field.
91
92       $set n comment
93                 This  line specifies the set identifier of the following mes‐
94                 sages until the next  $set  or  end-of-file  appears.  The  n
95                 denotes  the  set identifier, which is defined as a number in
96                 the range [1, {NL_SETMAX}] (see the <limits.h> header defined
97                 in the Base Definitions volume of POSIX.1‐2017). The applica‐
98                 tion shall ensure  that  set  identifiers  are  presented  in
99                 ascending  order within a single source file, but need not be
100                 contiguous. Any string following the set identifier shall  be
101                 treated  as a comment. If no $set directive is specified in a
102                 message text source file, all messages shall be located in an
103                 implementation-defined  default  message set NL_SETD (see the
104                 <nl_types.h> header defined in the Base Definitions volume of
105                 POSIX.1‐2017).
106
107       $delset n comment
108                 This line deletes message set n from an existing message cat‐
109                 alog. The n denotes the set  number  [1,  {NL_SETMAX}].   Any
110                 string  following  the  set number shall be treated as a com‐
111                 ment.
112
113       $ comment A line beginning with '$' followed  by  a  <blank>  shall  be
114                 treated as a comment.
115
116       m message-text
117                 The  m  denotes the message identifier, which is defined as a
118                 number in the range  [1,  {NL_MSGMAX}]  (see  the  <limits.h>
119                 header). The message-text shall be stored in the message cat‐
120                 alog with the set  identifier  specified  by  the  last  $set
121                 directive,  and  with  message identifier m.  If the message-
122                 text is empty, and a <blank> field separator is  present,  an
123                 empty  string  shall  be  stored in the message catalog. If a
124                 message source line has a message number, but neither a field
125                 separator  nor  message-text,  the existing message with that
126                 number (if any) shall be deleted from the catalog. The appli‐
127                 cation shall ensure that message identifiers are in ascending
128                 order within a single set, but need not  be  contiguous.  The
129                 application  shall  ensure that the length of message-text is
130                 in the range [0, {NL_TEXTMAX}] (see the <limits.h> header).
131
132       $quote n  This line specifies an optional quote character c, which  can
133                 be  used  to  surround  message-text so that trailing <space>
134                 characters or null (empty) messages are visible in a  message
135                 source  line.  By default, or if an empty $quote directive is
136                 supplied, no quoting of message-text shall be recognized.
137
138       Empty lines in a message text source file shall be ignored. The effects
139       of lines starting with any character other than those defined above are
140       implementation-defined.
141
142       Text strings can contain the special characters  and  escape  sequences
143       defined in the following table:
144
145                       ┌──────────────────┬────────┬──────────┐
146Description    Symbol Sequence 
147                       ├──────────────────┼────────┼──────────┤
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,
158       two, or three octal digits, which shall be taken to specify  the  value
159       of  the  desired character. If the character following a <backslash> is
160       not one of those specified, the <backslash> shall be ignored.
161
162       A <backslash> followed by a <newline> is also used to continue a string
163       on  the following line. Thus, the following two lines describe a single
164       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

CONSEQUENCES OF ERRORS

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

APPLICATION USAGE

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

EXAMPLES

194       None.
195

RATIONALE

197       None.
198

FUTURE DIRECTIONS

200       None.
201

SEE ALSO

203       iconv
204
205       The  Base  Definitions  volume  of POSIX.1‐2017, Chapter 8, Environment
206       Variables, <limits.h>, <nl_types.h>
207
209       Portions of this text are reprinted and reproduced in  electronic  form
210       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
211       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
212       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
213       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
214       event of any discrepancy between this version and the original IEEE and
215       The Open Group Standard, the original IEEE and The Open Group  Standard
216       is  the  referee document. The original Standard can be obtained online
217       at http://www.opengroup.org/unix/online.html .
218
219       Any typographical or formatting errors that appear  in  this  page  are
220       most likely to have been introduced during the conversion of the source
221       files to man page format. To report such errors,  see  https://www.ker
222       nel.org/doc/man-pages/reporting_bugs.html .
223
224
225
226IEEE/The Open Group                  2017                           GENCAT(1P)
Impressum