utility merges the message text source file(s)
msgfile into a formatted message database
will be created if it does not already exist.
does exist its messages will be included in the new
If set and message numbers collide,
the new message-text defined in
will replace the old message text currently contained in
If - is used for catfile, then gencat writes the
message catalog file to standard output.
If - is used for msgfile, then gencat reads the
message text source from standard input.
The message text source file (or set of files) input to
can contain either set and message numbers or simply
message numbers, in which case the set NL_SETD [see
If msgfile is not specified, gencat will read from stdin.
The -l option lists messages to standard output.
The -m option specifies ``malloc''-format messages.
option is the same as
The -f option allows different format message catalogs to be generated.
Arguments that can be used with this option are:
Produce the System V Release 4 format catalog.
(This is the default if -f or -m are not specified.)
This is equivalent to the -m option.
This is the default if the POSIX2 environment variable is set.
Produce message catalogs suitable for use with SCO
If the -m or -f options are not used, the format of an existing
message catalog will be retained.
The -f option can be used to change the format of a catalog.
The format of a message text source file is defined as follows.
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 as being part of the subsequent field.
n specifies the set identifier of the
following messages until the next
or end-of-file appears.
n must be a number in the range (1 to NL_SETMAX).
within a single source file need not be contiguous.
Any string following the set identifier is treated as a comment.
directive is specified in a message text source file, all messages
will be located in
the default message set
Delete message set
existing message catalog.
Any string following the set number is treated as a comment.
(If n is not a valid set it is ignored.)
A line beginning with a dollar symbol ``$'' followed by an ASCII space or
tab character is treated as a comment.
denotes the message identifier,
which is a number in the range (1 to NL_MSGMAX).
is stored in the message catalog
with the set identifier
specified by the last
directive, and with message identifier
and an ASCII space or tab field separator is present, an empty string is
stored in the message catalog.
If a message source line has a
message number, but neither a field separator nor
the existing message with that number (if any) is deleted from the
need not be contiguous.
The length of
must be in the range (0 to NL_TEXTMAX).
This line specifies an optional quote character
which can be used to surround
so that trailing spaces or null (empty) messages are visible in a
message source line.
By default, or if an empty
directive is supplied, no quoting of
will be recognized.
Empty lines in a message text source file are ignored.
Text strings can contain the special characters and
escape sequences defined in the following table:
The escape sequence
consists of backslash followed by 1, 2 or 3 octal digits,
which are taken to specify the value of the desired character.
If the character following a backslash is not one of those specified,
the backslash is ignored.
Backslash followed by an ASCII newline character is also used
to continue a string on the following line.
Thus, the following two lines describe a single message string:
1 This line continues \
to the next line
which is equivalent to:
1 This line continues to the next line
This version of gencat is built on the
The gencat database
comprises two files: catfile.m, which is a catalog in
which contains the information required to translate
a set and message number into a simple message number which can be used
in a call to gettxt.
Using gettxt constrains the catalogs to be located in a subdirectory
This restriction is lifted by placing only a symbolic
link to the catalog in the directory /usr/lib/locale/Xopen/LC_MESSAGES
when the catalog is opened.
It is this link that gettxt uses when
attempting to access the catalog.
The link is removed when the catalog is closed,
but occasionally as applications exit abnormally without closing catalogs
redundant symbolic links will be left in the directory.
For compatibility with previous version of gencat released in a number
of specialized internationalization products, the -m option is supplied.
This option causes gencat to build a single file
that is compatible
with the format catalogs produced by the earlier versions.
The retrieval routines detect the type of catalog they are using and act
language-specific message file [See LANG on