Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > G

gencat(1)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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. A msgfile 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 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 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 comment. By default, or if a quote character q not is supplied, quoting of message_text is not recognized.

$ comment

A $ followed by a space or tab is treated as a comment and can appear anywhere in a file. A line consisting of zero or more spaces or tabs is treated as a comment line.

NL_TEXTMAX, NL_SETMAX, and NL_MSGMAX are defined in <limits.h>. NL_SETD is defined in <nl_types.h>. MAX_BUFLEN is defined in <msgcat.h>.

EXTERNAL INFLUENCES

Environment Variables

LANG provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the default value of "C" (see lang(5)) is used. If any of the internationalization variables contains an invalid setting, gencat will behave as if all internationalization variables are set to "C". See environ(5).

LC_ALL, if set to a non-empty string value, overrides the values of all of the other internationalization variables.

LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classification of characters as printable, and the characters matched by character class expressions in regular expressions.

LC_MESSAGES determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output.

NLSPATH determines the location of message catalogs for the processing of LC_MESSAGES.

International Code Set Support

Single- and multi-byte character code sets are supported.

WARNINGS

The $quote directive is not currently supported on the HP MPE and RTE operating systems.

AUTHOR

gencat was developed by HP and the X/Open Company, Ltd.

SEE ALSO

dumpmsg(1), findmsg(1), insertmsg(1), catgets(3C), catopen(3C).

Native Language Support Users Guide.

STANDARDS CONFORMANCE

gencat: XPG2, XPG3

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.