GENCAT(1) Domain/OS BSD GENCAT(1)
NAME
gencat - generate a formatted message catalog
SYNOPSIS
gencat catfile msgfile ...
DESCRIPTION
The gencat utility merges the message text source file(s) msgfile into a
formatted message catalog catfile. The file catfile will be created if
it does not already exist. If catfile does exist, its messages will be
included in the new catfile. If set and message numbers collide, the new
message text defined in msgfile will replace the old message text
currently contained in catfile.
A msgfile consists of message, directive, and comment lines (all without
leading spaces or tabs) and is defined as follows. Note that 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.
$set n [comment]
A $set directive specifies the set identifier of the following
messages until the next $set, $delset or end-of-file appears.
The n denotes the set identifier, which is a number 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 msgfile,
all messages will be located in the implementation-defined
default message set NL_SETD.
$delset n [comment]
A $delset directive deletes message set n from an existing
message catalog. The n denotes the set number [1,
{NL_SETMAX}]. Any string following the set identifier is
treated as a comment.
m message_text
A message line specifies a message identifier and associated
message text. The m denotes the message identifier, which is a
number in the range [1, {NL_MSGMAX}]. The message identifier m
is separated from the message_text by a single space or tab
character. Extra spaces or tabs, including any trailing spaces
or tabs, are considered part of the message_text. The length
of message_text must be in the range [0, {NL_TEXTMAX}] bytes.
The message_text is stored in catfile with the set identifier n
specified by the last $set directive, and with message
identifier m. 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, an empty string is
stored in catfile. If a message source line has a message
number, but has neither a field separator nor message_text, the
existing message with that number (if any) is deleted from the
catalog.
$comment A line beginning with a $ followed by an ASCII space of tab
character is treated as a comment and can appear anywhere in
the msgfile.
$quote c A $quote directive specifies an optional quote character c,
which can be used to surround message_text so that trailing
spaces or null (empty) messages are visible in a message source
line.
NL_TESTMAN, NL_SETMAX, and NL_MSGMAX are defined in <limits.h>. NL_SETD
is defined in <nl_types.h>.
NOTES
Messages will be issued in LANG if it is set to a valid language and LANG
messages are available. Otherwise C locale messages will be issued.
IMPLEMENTATION
Follows the X/OPEN Portability Guide XPG3
SEE ALSO
catdump(1)