Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gencat(1P)

gencat(4P)  —  

NAME

gencat − format of message text source file used as input to gencat(1P)

DESCRIPTION

This entry supplies the format of a message text source file as defined by the X/Open Portability Guide, Volume 3, XSI Supplementary Definitions, Section 5.2.1, Message Text Source Files. The following symbolic constant values are found in /usr/include/sys/limits.h and /usr/include/nl_types.h, respectively:

Symbolic Value
Constant
NL_SETMAX 255
NL_MSGMAX 32767
NL_TEXTMAX 1023
NL_SETD 1

The format of a message text source file 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
This line specifies the set identifier of the messages that follow until the next $set, $delset, or end-of-file appears.  The n denotes the set identifier, which is defined as 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 a message text source file, all messages will be located in an implementation-defined default message set NL_SETD. 

$delset n comment
This line deletes message set n from an existing message catalog.  The n denotes the set number [1, {NL_SETMAX}].  Any string following the set number is treated as a comment. 

$ comment
A line beginning with $ followed by an ASCII space or tab character is treated as a comment. 

m message-text
The m denotes the message identifier, which is defined as a number in the range [1, {NL_MSGMAX}].  The message-text is stored in the message catalog with the set identifier specified by the last $set directive, and with message identifier m. If the message-text is empty 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 message-text, the existing message with that number (if any) is deleted from the catalog. Message identifiers must be in ascending order within a single set but need not be contiguous. The length of message-text must be in the range [0,{NL-TEXTMAX}]. 

$quote c
This 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.  By default, or if an empty $quote directive is supplied, no quoting of message-text will be recognized. 

Empty lines in a message text file are ignored.  The effects of lines starting with any character other than those defined above are implementation defined. 

Text strings can contain the special characters and escape sequences defined in the following table:

Description Symbol Sequence
new-line character NL(LF) \n
horizontal tab HT \t
vertical tab VT \v
backspace BS \b
carriage return CR \r
form-feed FF \f
backslash \ \\
bit pattern ddd \ddd

The escape sequence \ddd consists of a backslash followed by one, two, or three 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. 

A backslash followed by an ASCII new-line 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

SEE ALSO

gencat(1P) in the INTERACTIVE UNIX System User’s/System Administrator’s Reference Manual.

\*U  —  Version 1.0

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