
g
gencat(1) | gencat(1) |
NAME
gencat - generate a formatted message catalog ®le
SYNOPSIS
gencat
DESCRIPTION
Message catalogs allow a program to process input and produce output according to local customs and languages. For details, see Native Language Support Users Guide.
The gencat command merges each message source msg®le into a formatted message catalog cat®le that can be accessed by catgets() (see catgets(3C)). If cat®le does not exist, it is created. If cat®le exists, its messages are included in the new cat®le. If set and message numbers collide, the new message text in ®le replaces the old message text in cat®le. A msg®le consists of message, directive, and comment lines (all without leading spaces or tabs) described below. Except as noted, ®elds are separated by one or more space or tab characters.
If - is speci®ed as catalog ®le, standard output is used.
If - is speci®ed for an instance of message ®le, standard input is used.
$set s [comment] | A $set directive speci®es the set s, of the messages that follow until the |
| next $set or |
| the range 1 through NL_SETMAX. Any string following the set number is |
| treated as a comment. If a $set directive is not speci®ed, messages are put |
| in the default set NL_SETD. |
| Set numbers must be in ascending order within a msg®le but need not be con- |
| tiguous. |
$delset s [comment] A $delset directive deletes the message set identi®ed by the set number s, from an existing message catalog. Any string following the set number is treated as a comment.
m message_text | A message line speci®es a message number m, and associated message text. | |
| The message number m is an unsigned integer in the range 1 through | |
| NL_MSGMAX. The message_text is a C string, including spaces, tabs and \ | |
| (backslash) escapes, but by default without surrounding quotes (see $quote | |
| directive below). The message number m is separated from the message_text | |
| by a single space or tab character. The message_text begins with the ®rst | |
| character following the separator and ends at | |
| (including any trailing spaces or | tabs) are considered part of the |
| message_text . |
|
| The message_text of a message line is stored in cat®le with message number | |
| m and set number s speci®ed by the most recent $set directive. | |
| Message numbers must be in ascending order within a set, but need not be | |
| contiguous. |
|
| Note that the space or tab separator distinguishes insertion of a null message | |
| from deletion of a message. If a message line has a number and separator | |
| but no text, the message number and an associated null message string are | |
| stored in cat®le. If a message line has a number but neither separator nor | |
| text, the message number and its associated message text are deleted from | |
| cat®le. |
|
If the | ||
| than MAX_BUFLEN − 1 bytes. If the | |
| message_text must be no more than | NL_TEXTMAX bytes. See catgets(3C), |
| for message length limits imposed by these routines. | |
$quote [q comment] | A $quote directive speci®es a quote character q, used to surround | |
| message_text and make leading and trailing space visible in a message line. | |
| Any string following the speci®ed quote character q is treated as a comment. | |
| By default, or if a quote character q not is supplied, quoting of message_text is | |
| not recognized. |
|
Section 1−314 | − 1 − | |