Esempio n. 1
0
int     main( int argc, char *argv[] ) {
//======================================

// Call user's program.

    argc = argc; argv = argv;
    RTSysInit();
    Spawn( &FMAIN );
    return( 0 );
}
Esempio n. 2
0
static  unsigned  InitFThreads( void )
//====================================
{
    if( ThreadsInitialized )
        return( 0 );
    if( __InitFThreadProcessing() != 0 )
        return( 1 );
    ThreadsInitialized = true;
    RTSysInit();
    return( 0 );
}
Esempio n. 3
0
void    RTErr( int errcode, ... ) {
//=================================

// Print a run-time error message and halt execution.

    va_list     args;

    RTSysInit();
    va_start( args, errcode );
    RTErrHandler( errcode, args );
    va_end( args );
}
Esempio n. 4
0
int PASCAL  WinMain( HINSTANCE thishandle, HINSTANCE prevhandle, LPSTR cmdline, int cmdshow ) {
//===========================================================================

    PgmHandle = thishandle;
    PrevHandle = prevhandle;
    CmdLine = cmdline;
    CmdShow = cmdshow;
    RTSysInit();
    RTSpawn( &CallFWINMAIN );

    return( RetCode );
}
Esempio n. 5
0
void            SetModule( traceback *tb ) {
//==========================================

    RTSysInit();
    // if TraceRoutine is not NULL the first time SetModule() is called,
    // we can assume we have linked with WATFOR-77 and will use its method
    // of printing traceback information
    if( TraceRoutine == NULL ) {
        TraceRoutine = &TraceInfo;
    }
    if( ExCurr == tb ) {        // delete entry from traceback chain
        ExCurr = ExCurr->link;
    } else {                    // add entry to traceback chain
        tb->link = ExCurr;
        ExCurr = tb;
    }
}
Esempio n. 6
0
void SetIOCB( void ) {
//=========================

    RTSysInit();
    _AccessFIO();
    _RWD_XcptFlags |= XF_IO_INTERRUPTABLE;
    IOSysInit();
    if( IOCB->flags & IOF_SETIOCB ) {
        _PartialReleaseFIO();
        return;
    }
    if( IOCB->flags & IOF_ACTIVE ) {
        RTErr( IO_ACTIVE_ALREADY );
    }
    IOCB->fileinfo = NULL;
    IOCB->set_flags = 0;
    IOCB->status = 0;
    IOCB->typ = 0;
    IOCB->flags = IOF_ACTIVE | IOF_SETIOCB;
}
Esempio n. 7
0
void    Pause( string PGM *ptr ) {
//================================

// Process a PAUSE statement.

    RTSysInit();
    if( ptr != NULL ) {
        _AccessFIO();
        // Before writing the error message, flush standard output files so that
        // if unit 6 is connected to the standard output device which has been
        // redirected to a file, the file gets flushed before the error message
        // is written.
        FlushStdUnit();
        StdBuffer();
        StdWrite( ptr->strptr, ptr->len );
        StdFlush();
        _ReleaseFIO();
    }
    WaitForEnter();
}
Esempio n. 8
0
void            SetLine( uint src_line ) {
//========================================

    RTSysInit();
    ExCurr->line = src_line;
}