HP 9000 User Manual page 163

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

8
1*
**************************************************************************
** startO
**
** description:
** set up language tables
** open message catalogs
** parse command line
** set up global variables
**
** global variables:
** Catd: nl_catd message catalog descriptor
** Progname: char pointer to the program name
** Filename: pointer to pointer to current file name
**
File~ode:
mode (Latin or lon-Latin) of the current input file
**
** return value:
** 0: everything
~ent
ok
** -1: had some trouble
**************************************************************************
*1
static int
start( argc, argv)
int argcj
1*
current argument count
*1
char **argv;
1*
ptr to ptr to current argument
*1
{
nl_mode
term~ode;
1*
mode of terminal (Latin-lon-Latin
*1
nl_order term_order;
1*
order terminal (Key-Screen)
*1
nl_order file_order;
1*
order of file (Key-Screen)
*1
char *termname j
1*
terminal name from TEM
*1
char *lopts;
1*
language options from LAIGOPTS
*1
int optcharj
1*
option character for getopts(3c)
*1
static char *deffiles[] = {"_", (char*) IULL}j
1*
default input file name
*1
1*
get the program base name in case it is renamed via In(l)
*1
Progname = get_basename( *argv);
1*
get locale t initialize environment table
*1
if (!setlocale( LC_ALL, 1111»
{
1*
bad initialization
*1
(void) fputs( _errlocale(), stderr);
Catd = (nl_catd) -1;
(void) putenv( ILAIG=")j
1*
for perror
*1
}
else {
1*
good initialization: open message catalog,
... use hardcoded name for first parameter,
8-6
Example of Internationalized Software

Advertisement

Table of Contents
loading

Table of Contents