HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)

m
mkcatdefs(1) mkcatdefs(1)
#define GREET 1
#define BYE 2
#define ENTER 3
/* definitions for set RESULTS */
#define RESULTS 2
#define NADA 1
#define FOUND 2
/* definitions for set PROBLEMS */
#define PROBLEMS 3
#define SERVCONN 1
#define BUSYDAY 2
#endif
/* Default messages generated from PFF.src */
#define DEF_GREET "Welcome to the Product Fact Finder program!\n"
#define DEF_BYE "Good-bye. Please come again.\n"
#define DEF_ENTER "Please enter the type of product \
you are interested in: "
#define DEF_NADA "Sorry, we have no information on that \
kind of product.\n"
#define DEF_FOUND "The following products were found: "
#define DEF_SERVCONN "Cannot connect to server. Try again later.\n"
#define DEF_BUSYDAY "Still searching. Please wait...\n"
#endif
% dspcat PFF.cat
1 : 1 Welcome to the Product Fact Finder program!
1 : 2 Good-bye. Please come again.
1 : 3 Please enter the type of product you are interested in:
2 : 1 Sorry, we have no information on that kind of product.
2 : 2 The following products were found:
3 : 1 Cannot connect to server. Try again later.
3 : 2 Still searching. Please wait...
In this catalog, there are three message sets defined from those specified in the message source file. When
displaying messages from this catalog, the dspmsg command uses numbers as set and message identifiers.
For example:
% dspmsg -s 1 PFF.cat 1
Welcome to the Product Fact Finder program!
The following script illustrates the use of symbols for default message strings. By default, dspmsg
searches for message catalogs first in the appropriate locale directory subordinate to /usr/lib/nls/msg and
then in the current directory:
#! /bin/sh
#
# test_dspmsg.sh
.
.
.
. ./PFF_msg.sh
.
660 Hewlett-Packard Company 5 HP-UX 11i Version 3: February 2007