lib/msgcat
Messages corresponding to UNIX and TeraScan error numbers are stored in and accessed from a message catalog. This catalog is compiled from the ASCII file include/messages, using the program gencat. The source for the gencat program is include/gencat.c.
The format of the input to gencat is simple ASCII text. Lines starting with $ are assumed to be comment lines, and are ignored by gencat. Other lines must have one of the following two forms:
The first form is most useful, and is used by include/messages. Message numbers must be strictly increasing and be between
n*1000 + 1 and n*1000 + 999,
for some fixed n. include/messages uses n=0. The idea is to collect different sets of messages in different catalogs.
Message text can continue on the next line if the last character on the line is \\. This does not insert a newline character.
\\n, \\r, \\f, \\b, and \\t are interpreted according to C language convections. \\ddd, where ddd is an octal number beginning with 0 or 1, is interpreted according to C language conventions. Messages, after interpretation and including a trailing \ , cannot exceed 1024 characters.
The format of the output of gencat, namely lib/msgcat is as follows:
"TSCANMSG" (8 bytes) undefined (4 bytes) number of messages (4 bytes) for each message message number (2 bytes) message length (2 bytes) offset to text (4 bytes) heap of message text
lib/msgcat, include/messages, include/gencat.c
outpstr
The message catalog was used for the following reasons:
uniform error messages across applications
reducing code space by excluding message text from code
language independence could be achieved by maintaining different message catalogs for each language
Only the first reason has proven to have any merit. Applications were developed without using message catalogs.
Last Update: $Date: 1999/05/10 20:58:58 $