Beispiel #1
0
void    IOPurge( void ) {
//=======================

// make sure all the input files are closed

    while( CurrFile != NULL ) {
        Conclude();
    }
}
Beispiel #2
0
void InvokeCompile( void )
{
    InitMacros();
    ComRead(); // pre-read must occur here in case of null program
    if( ProgSw & PS_SOURCE_EOF ) {
        Conclude();
    } else {
        DoCompile();
    }
    FiniMacros();
}
Beispiel #3
0
OVL_EXTERN bool DoneInvLine( void *inv, inp_rtn_action action )
{
    switch( action ) {
    case INP_RTN_INIT:
    case INP_RTN_EOL:
        if( !GetInvkCmd( inv ) ) return( FALSE );
        ReScan( ((invokes *)inv)->buff );
        return( TRUE );
    case INP_RTN_FINI:
        Conclude( inv );
        return( TRUE );
    default:
        return( FALSE ); // silence compiler
    }
}
Beispiel #4
0
static bool CompSProg( void )
{
    bool        fini_subprog;

    InitSubProg();
    fini_subprog = FALSE;
    for(;;) {
        for(;;) {
            if( CurrFile->flags & INC_PENDING ) {
                CurrFile->flags &= ~INC_PENDING;
                ProcInclude();
                ComRead();
            } else if( CurrFile->flags & CONC_PENDING ) {
                if( ( ProgSw & PS_DONT_GENERATE ) &&
                    ( ( Options & OPT_SYNTAX ) == 0 ) &&
                    ( ( ProgSw & PS_ERROR ) == 0 ) &&
                    ( CurrFile->link == NULL ) ) break;
                Conclude();
                if( CurrFile == NULL ) break;
                ComRead();
            } else {
                break;
            }
        }
        Options = NewOptions;
        if( ProgSw & ( PS_SOURCE_EOF | PS_END_OF_SUBPROG ) ) break;
        CompStatement();
        if( ProgSw & ( PS_SOURCE_EOF | PS_END_OF_SUBPROG ) ) {
            // consider:        call sam
            //                  end
            //          c$include sam
            // Before we open 'sam', we must finish off the subprogram
            // so we get the correct file name in the traceback.
            FiniSubProg();
            fini_subprog = TRUE;
        }
        if( TBreak() ) return( TRUE );
    }
    if( !fini_subprog ) {
        FiniSubProg();
    }
    return( FALSE );
}