HP 9000 User Manual page 162

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

main(argc. argv)
int argc;
/* initial argument count */
char **argv;
/* ptr to ptr to first program argument */
{
}
/* assume a successful return
value*/
register int ret val
=
GOOD;
/* initialize. parse cmd line options, get input files, etc. */
if (start( argc, argv)
==
BAD) {
retval
=
BAD;
}
/* open and process input files one at a time */
for
(
;
*Filename
;
Filename++)
{
/* open input file and get next if can't open */
if
(!
strcmp( *Filename, H_H»
{
Input
=
stdin;
}
else if
(!
(Input = fopen (*Filename, HrH») {
Perror( Hfopen H );
retval
=
BAD;
continue;
}
/* process the file */
if «*Process)( )
==
BAD) {
retval
=
BAD;
}
/* close input file unless it's stdin */
if (Input
!=
stdin) {
if (fclose( Input)
EOF) {
}
}
}
Perror( Hfclose H );
retval
=
BAD;
/* end the program */
if (finish( )
==
BAD) {
retval = BAD;
}
return retval;
Example of Internationalized Software
B·5
B

Advertisement

Table of Contents
loading

Table of Contents