getmsg - Open a catalog file and display the requested message
getmsg catalog_name No_set No_msg [-h] [-d default_msg] [value1 value2 ...] catalog_name The catalog to be oppened No_set The message set number in catalog catalog_name No_msg The message number in set No_set -h Display usage -d default_msg default_msg, instead of pre-defined error message in the progam, will be display if there is any error getting message drom the catalog. value1 value2 ... The values used to replace the variables (%i and/or %s) in the requested message or default_msg. The type and order of the val- ues must match the type and order of the variables (%i and/or %s) in the requested message and default_msg. Example: The following example tries to open catalog SUNW_SPRO_libsunperf and display message number 2 from set number 1. It will outout "Memory error in function XXX allocating 1000 bytes" in case any errors. % getmsg SUNW_SPRO_libsunperf 2 1 -d "Memory error in %s allo- cating %ld bytes." "function XXX" 1000
getmsg(3P) getmsg(3P)
NAME
getmsg - Open a catalog file and display the requested message
SYNOPSIS
getmsg catalog_name No_set No_msg [-h] [-d default_msg] [value1 value2
...]
catalog_name
The catalog to be oppened
No_set The message set number in catalog catalog_name
No_msg The message number in set No_set
-h Display usage
-d default_msg
default_msg, instead of pre-defined error message in the progam,
will be display if there is any error getting message drom the
catalog.
value1 value2 ...
The values used to replace the variables (%i and/or %s) in the
requested message or default_msg. The type and order of the val-
ues must match the type and order of the variables (%i and/or
%s) in the requested message and default_msg.
Example:
The following example tries to open catalog SUNW_SPRO_libsunperf
and display message number 2 from set number 1. It will outout
"Memory error in function XXX allocating 1000 bytes" in case any
errors.
% getmsg SUNW_SPRO_libsunperf 2 1 -d "Memory error in %s allo-
cating %ld bytes." "function XXX" 1000
DESCRIPTION
The getmsg command trys to find and open the catalog file cata-
log_name.cat and display message No_msg in set No_set.
If the catalog file cannot be found or oppened, getmsg displays an
error message or displays default_msg if provided.
If environment variable NLSPATH is set to path/%N.cat, getmsg will
search path for the catalog file catalog_name.cat. Otherwise, getmsg
will search PATH for possible pathes that may contain cat files.
getmsg returns 0 if the catalog is successfully opened and and the mes-
sage is successfully displayed; 1 otherwise.
7 Nov 2015 getmsg(3P)