Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gencat(1) — HP-UX 5.50

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

findmsg(1)

insertmsg(1)

catgetmsg(3C)

catgets(3C)

catopen(3C)

GENCAT(1)  —  HP-UX

NAME

gencat − generate a formatted message catalogue file

SYNOPSIS

gencat catfile file ... 

DESCRIPTION

Gencat merges message source files into a formatted catfile that can be accessed by catgetmsg(3C) or catgets(3C). If catfile does not exist, it will be created.  If catfile does exist, its messages will be included in the new catfile unless set and message numbers collide, in which case the new supersedes the old.  File consists of one or more sets of messages, along with optional comments and directives.  The text of all lines must begin in the first column. 

A comment is a line that begins with a dollar sign ($) followed by a blank and can appear anywhere in a file. 

A message set consists of a line of the form:

$setn [comment]

followed by lines of the form:

m message-text

where n denotes the set number ­(1-{NL_SETMAX}), m the message number ­(1-{NL_MSGMAX}), and message_text the text (not more than NL_TEXTMAX bytes) associated with set number n and message number m. NL_TEXTMAX, NL_SETMAX, and NL_MSGMAX are defined in <limits.h>. 

A $set line may optionally contain comment text following the set number.  Set numbers and message numbers must be in ascending order but need not be contiguous. 

Message-text is a C string, including white space and \ (backslash) escapes, but by default without surrounding quotes.  The optional quote character c must be specified by the directive:

$quote c

before the quote character is used.  The quote character can be used to surround message-text to render trailing spaces or null (empty) messages visible in a message source line.  By default, or if an empty $quote directive is supplied, no quoting of message-text will be recognized. 

The delimiter between m, the message number, and message-text, the text, is one blank or tab. Any additional blank or tab characters following the message number and the delimiter are considered part of the message-text. This delimiter is important for the following reason: If a message source line has a number but neither delimiter nor text, the existing message with this number is deleted from the catalogue. However, if a message source line has both number and delimiter but no text, a null message string associated with this message number is stored in the catalogue.

To delete an entire message set, the directive:

$delset set_number

may be placed at the beginning of a line between sets. 

Message catalogues are used to allow a program to process input and produce output according to the customs and languages of various countries.  Without message catalogues, a different version of the source code must be maintained for each language a program supports.  With message catalogues, only one source file and a message catalogue containing the translated message strings are needed to process in each desired language. 

WARNINGS

The $quote directive is not currently supported on MPE or RTE systems.  (MPE and RTE are HP operating systems.) 

HARDWARE DEPENDENCIES

Series 200, 300, 500
Getmsg(3C) should be used to access a message catalogue file because catgetmsg(3C) and catgets(3C) are not currently supported.

The set number n in a message set must be in the range 1-255.  The message number m in a message set must be in the range 1-32767. 

The include file <limits.h> is not currently supported. 

The quote directive c is currently not supported. 

AUTHOR

Gencat was developed by HP. 

SEE ALSO

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

INTERNATIONAL SUPPORT

8- and 16-bit data, 8-bit file names, messages. 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026