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), and exit(3c). Printed 5/12/88 1
%%index%% na:264,85; sy:349,513; de:862,982; ca:1844,355; se:2199,181; %%index%%000000000094