The generated message catalog contains message strings that will be retrieved using the catgets(3) library call. These messages are dynamically loaded by the Native Language Support (NLS) library at run time. Error messages are grouped into sets, and a program can load a particular set depending on which type, or language, of messages is desired.
$set
n comment
$set
or end-of-file.
The
n
is the set identifier which is defined as a number in the range
NL_SETMAX[1,
.]
Set identifiers within a single source file 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 the default message set
NL_SETD
.
$delset
n comment
NL_SETMAX[1,
.]
If a message set was created earlier in the
current file, or in a file previously read by the
gencat
command, this directive will remove it.
Any string following the set identifier is treated as a comment.
$
comment
$
followed by a space or tab character is treated as a comment.
NL_MSGMAX[1,
]
and the
message-text.
The
message-text
is read until the end of the line or a quote character
(if one is specified).
The
message-text
is stored in the message catalog with
the set identifier specified by the last
$set
directive, and the message identifier
m.
If no
message-text
is provided,
the message with the message identifier
m
in the current set is removed from the catalog.
Message identifiers need not be contiguous within a single set.
The length of
message-text
must be in the range
NL_TEXTMAX[0,
.]
$quote
c
$quote
directive is specified, then the current quote character is unset.
Empty lines and leading blanks in a message text source file are ignored. Any line beginning with any character other than those described above is ignored as a syntax error.
Text message strings may contain any characters and the following special characters and escape sequences.
Description | Symbol | Sequence |
newline | 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
|
A bit pattern,
\ddd
,
consists of a backslash followed by
one, two, or three octal digits representing the value of the character.
The current quote character, if defined, may be escaped with a backslash
to generate the quote character.
Any character following the backslash ('\') other than those specified
is ignored.
A backslash at the end of the line continues the message onto the next line. The following two lines are an example of such a message:
1
This
message
continues
\
on the next line
Producing the following message:
1
This
message
continues
on
the
next
line