CRT0(3C) COMMAND REFERENCE CRT0(3C)
NAME
crt0 - C-program startup routine.
SYNOPSIS
extern int lasterr
extern char *pgmname
DESCRIPTION
Crt0 is an object file which contains the startup actions
for C language programs. It is loaded by default by the
compilers. It builds the argument lists, sets up a pointer
to the program name, and initializes the global exit code
(set by ERROR(3c) and used by exit(3c) ), and calls the
routine exit(3c) explicitly in case it is not called to exit
the program.
The global exit code is stored in the variable _last_err.
This value may be set by user programs in cases where ERROR
can not be called.
The variable _pgmname is a pointer to the basename of the
name of the program being executed. This value may be used
in order to find out what name the program was called by.
CAVEATS
The variable _pgmname is a pointer into the first element of
the argument list. Programs that change the value of the
first element of the argument list may trash the name of the
program, making messages from ERROR contain garbage.
SEE ALSO
cc(1), ld(1), ERROR(3c), exit(3c).
Printed 10/17/86 1
%%index%%
na:72,69;
sy:141,333;
de:474,922;
ca:1396,327;
se:1723,149;
%%index%%000000000093