gencat.1 (2010 09)

g
gencat(1) gencat(1)
NAME
gencat - generate a formatted message catalog file
SYNOPSIS
gencat [-l] catfile msgfile ...
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 msgfile into a formatted message catalog catfile that
can be accessed by
catgets() (see catgets (3C)). If catfile does not exist, it is created. If catfile exists,
its messages are included in the new catfile . If set and message numbers collide, the new message text in
file replaces the old message text in catfile.Amsgfile consists of message, directive, and comment lines
(all without leading spaces or tabs) described below. Except as noted, fields are separated by one or more
space or tab characters.
If
- is specified as catalog file, standard output is used.
If
- is specified for an instance of message file, standard input is used.
$set s [comment]A$set
directive specifies the set s, of the messages that follow until the
next
$set or end-of-file appears. The set number s is an unsigned integer
in the range 1 through NL_SETMAX. Any string following the set number
is treated as a comment. If a $set directive is not specified, messages are
put in the default set NL_SETD.
Set numbers must be in ascending order within a msgfile but need not be
contiguous.
$delset s [comment]A$delset directive deletes the message set identified 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 specifies 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 first character following the separator and ends at new-line.
Extra spaces or tabs (including any trailing spaces or tabs) are considered
part of the message_text .
The message_text of a message line is stored in catfile with message
number m and set number s specified 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 mes-
sage 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 catfile . If a message line has a number but neither
separator nor text, the message number and its associated message text are
deleted from catfile .
-l If the -l option is specified, the length of message_text must be no more
than MAX_BUFLEN 1 bytes. If the -l option is not specified, the length
of 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 specifies a quote character q, used to surround
message_text and make leading and trailing space visible in a message line.
Any string following the specified quote character q is treated as a com-
ment. By default, or if a quote character q not is supplied, quoting of
message_text is not recognized.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)