GENCAT(8,C) AIX Commands Reference GENCAT(8,C)
-------------------------------------------------------------------------------
gencat
PURPOSE
Generates a message catalog.
SYNTAX
+------------+
gencat --- catfile ---| |---|
^ +- descfile -+ |
+----------------+
DESCRIPTION
The gencat command generates a message catalog. It can be used to add, change,
or delete messages within an existing message catalog. The gencat command
takes as arguments a message catalog name (catfile) and one or more optional
message catalog descriptor files (descfile).
The descriptor files contain commands to gencat that specify message set
numbers, message numbers, and text that make up messages in the catalog. The
gencat command reads from standard input if no descriptor files are specified
on the command line. If the message catalog does not exist, a new message
catalog with the name catfile is created. If the catalog does exist, the
messages in the catalog are read into memory and are acted upon by the commands
specified in the descriptor files. The descriptor files are completely
processed in the order specified to assure consistent message catalog
generation.
The gencat command first searches the directory
/usr/lib/mbcs/msg/language.codeset/ for catfile. The language.codeset depends
on the current locale. (The locale may be changed using the LANG environment
variable.) For example, if the current locale is English, the default search
directory would be /usr/lib/mbcs/msg/En.pc850/. If catfile is not found in the
default search directory, gencat searches the current directory for catfile.
MESSAGE TEXT SOURCE FILE FORMAT
The format of a message text source file is defined as follows. Predefined
values and limits for message text source files are defined in the files
/usr/include/limits.h and /usr/include/nl_types.h. The fields of a message
text source line are separated by a single ASCII space or tab character. Any
other ASCII spaces or tabs are considered to be part of the subsequent field.
Processed November 8, 1990 GENCAT(8,C) 1
GENCAT(8,C) AIX Commands Reference GENCAT(8,C)
$set n comment
Specifies the set identifier of the following messages until the next
$set, $delset, or end-of-file appears. The n denotes the set
identifier, defined in the range 1...NL_SETMAX. Set identifiers must
be presented in ascending order within a single source file but need
not be contiguous. Any string following the set identifier is treated
as a comment. If no $set directive is specified in a message text
source file, all messages will be located in an implementation-defined
default message set NL_SETD.
delset n comment
Deletes message set n from an existing message catalog. The n denotes
the set number 1...NL_SETMAX. Any string following the set number is
treated as a comment.
$ comment
A line beginning with $ followed by an ASCII space or tab character is
treated as a comment.
m message text
The m denotes the message identifier, which is defined as a number in
the range 1...NL_MSGMAX. The message text is stored in the message
catalog with the set identifier specified by the last $set directive
and with message identifier m. If the message text is empty and an
ASCII space or tab field separator is present, an empty string is
stored in the message catalog. If the message source line has a
message number but neither a field separator nor message text, the
existing message with that number (if any) is deleted from the catalog.
Message identifiers must be in ascending order with a single set but
need not be contiguous. The length of message text must be in the
range 0...NL_TEXTMAX.
$quote c
Specifies an optional quote character c, which can be used to surround
message text so that trailing spaces or empty messages are visible in a
message source line. By default or if an empty $quote directive is
supplied, no quoting of message is recognized.
Empty lines in a message text source file are ignored. The effects of lines
starting with any character other than those defined above are considered empty
lines and are ignored.
Text strings can contain the special characters and escape sequences defined as
follows:
\n New line
\t Horizontal tab
\v Vertical tab
\b Backspace
\r Carriage return
\f Form feed
\\ Backslash
Processed November 8, 1990 GENCAT(8,C) 2
GENCAT(8,C) AIX Commands Reference GENCAT(8,C)
\ddd Octal digit; consists of a backslash followed by one, two or three
octal digits, which specify the value of the desired character. If the
character following a backslash is not one of those specified, the
backslash is ignored.
\xdddd Hexadecimal digit; represents one, two, or four hexadecimal digits,
which specify the value of the desired character. If a character that
can be represented as a hexadecimal digit follows a character that
represents a hexadecimal digit, a space must separate the two
characters.
Messages larger than NL_TEXTMAX bytes are truncated to the last character in
the message that fits into NL_TEXTMAX bytes. This method guarantees truncation
does not occur in the middle of a multibyte character.
RELATED INFORMATION
See the following commands: "mkcatdefs," "dspcat," "dspmsg," and "runcat."
See the catopen subroutine in the AIX Technical Reference.
See the "Message Catalog Generation" section of the "International Character
Support" chapter of the AIX Operating System Programming Tools and Interfaces.
See the "Messages" chapter in the AIX MBCS Guide.
Processed November 8, 1990 GENCAT(8,C) 3