HP 9000 User Manual page 144

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

NLSPATH="
lusr/y'N.
cat
II
;
export NLSPATH
Default Message Catalogs
The "standard" default message handling is to use the C locale messages as the
default string in catgets calls. This ensures that the program will be able to
issue messages even if there is no message catalog available.
If your application must access a C message catalog for the default messages,
the following is suggested:
if (! setlocale (LC_ALL,
1111»
{
else
fputs("Varning! call to setlocale failed\n", stderr);
fputs("Continuing processing using the \"C\" locale\n", stderr);
catd = (nl_catd)-1;
}
catd = catopen("name", 0);
if (catd == (nl_catd)-1) {
/*
if necessary, user may save LANG at this point
*/
putenv("LANG=C") ;
/*
try NLSPATH
*/
catd = catopen("name", 0);
/*
if necessary, user may restore LANG at this point
*/
if (catd == (nl_catd)-1)
/*
try hard-coded path
*/
catd = catopen(" /usr/lib/nls/C/name.cat", 0);
}
Programs That Call exec
For commands that exec other commands, we recommend that the first
command call setlocale. If the call is unsuccessful, use putenv to reset all the
8
NLS environment variables to ensure that the other commands don't repeat the
unsuccessful setlocale call and issue additional error messages.
Advanced NLS Topics
8-11

Advertisement

Table of Contents
loading

Table of Contents