hit counter script

HP 9000 User Manual page 118

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

Compiling a Message Catalog
Once the message text source file is correct, a message catalog can be
generated. For example, if prog.msg contains the messages for prog. c, then
you would type the following:
gencat prog.cat prog.msg
This generates prog. cat, a message catalog for prog. c. This step is analogous
to compiling the source program: the message text source file is "compiled"
into a binary message catalog for use by the program at run-time.
An Example of Programming with Message Catalogs
To see how this all fits together, suppose prog. c is the standard sample
program:
mainO
{
printf("hello world\n");
}
When converted to use message catalogs, prog. c would look like this:
#include <nl_types.h>
maine)
{
nl_catd catd;
catd
=
catopen("prog", 0);
printf(catgets(catd, NL_SETD, 1, "hello world\n"));
}
The message text source file would be:
$ message catalog for hello world
1 hello world\n
The program would be compiled as:
cc
-0
prog prog.c
and the message catalog would be generated as:
gencat prog.cat prog.msg
The Message Catalog System
7·11
7

Advertisement

Table of Contents
loading

Table of Contents