HP 9000 User Manual page 119

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

For this example,
• We have used "standard" default message handling: default messages are the
default strings in catgets calls, and these will be returned as messages if
catopen fails.
• The program name is also the message catalog name so that catopen will
search the standard places when looking for a message catalog.
• The default set, NL_SETD, is used in the source program and the use
of
a set
directive in the message text source file is omitted.
Special Considerations for Messaging
• Messages in variables require special treatment. For example, the message in:
char.*msg
=
"message";
prin~f(msg);
would, given a "direct" conversion, result in:
char *msg
=
catgets(catd, set_num, msg_num, "message");
printf(msg);
7
This would generate a compile error. The required conversion is:
char *msg
=
"message";
printf(catgets(catd, seLnum, msg_num, msg));
• Messages in arrays require somewhat more elaborate treatment. Before
conversion, an original source might contain the following:
static char *msg_tbl[]
= {
"message 1",
"me~sage
2",
"message N"
7 -12
The Message Catalog System

Advertisement

Table of Contents
loading

Table of Contents