VMS Help
CRTL, VAXC$CRTL_INIT
*Conan The Librarian
|
Allows you to call the Compaq C RTL from other languages or to
use the Compaq C RTL when your main function is not in C. It
initializes the run-time environment and establishes both an exit
and condition handler. VAXC$CRTL_INIT is a synonym for DECC$CRTL_
INIT. Either name invokes the same routine.
Format
#include <signal.h>
void VAXC$CRTL_INIT();
The following example shows a Pascal program that calls the
Compaq C RTL using the VAXC$CRTL_INIT function:
On OpenVMS Alpha systems:
$ PASCAL EXAMPLE
$ LINK EXAMPLE,SYS$LIBRARY:VAXCRTL/LIB
$ TY EXAMPLE.PAS
PROGRAM TESTC(input, output);
PROCEDURE VAXC$CRTL_INIT; extern;
BEGIN
VAXC$CRTL_INIT;
END
$
A shareable image need only call this function if it contains
an Compaq C function for signal handling, environment variables,
I/O, exit handling, a default file protection mask, or if it is a
child process that should inherit context.
Although many of the initialization activities are performed
only once, DECC$CRTL_INIT can safely be called multiple times. On
OpenVMS VAX systems, DECC$CRTL_INIT establishes the Compaq C RTL
internal OpenVMS exception handler in the frame of the routine
that calls DECC$CRTL_INIT each time DECC$CRTL_INIT is called.
At least one frame in the current call stack must have that
handler established for OpenVMS exceptions to get mapped to UNIX
signals.