Esempio n. 1
0
static  void    BitOption( opt_entry *optn, bool negated ) {
//==========================================================

// Process an option that has a bit value.

    ftnoption   opt_bit;

    opt_bit = optn->value;
    if( !negated ) {
        // TYPE turns off PRINT and vice-versa
        if( opt_bit & DISK_MASK ) {
            NewOptions &= ~DISK_MASK;
            NewOptions |= OPT_LIST;
        }
        if( opt_bit & OPT_LIST ) {
            SetLst( true );
        }
        // SAVE turns off AUTOMATIC and vice-versa
        if( opt_bit & ( OPT_SAVE | OPT_AUTOMATIC ) ) {
            NewOptions &= ~( OPT_SAVE | OPT_AUTOMATIC );
        }
        NewOptions |= opt_bit;
    } else if( opt_bit & OPT_NO_NO ) {
        Warning( CO_BAD_NO, optn->option );
    } else {
        NewOptions &= ~opt_bit;
        if( opt_bit & OPT_LIST ) {
            SetLst( false );
        }
    }
}
Esempio n. 2
0
static  void    ErrHandler( char *err_type, int error, va_list args )
// Handle errors ANY time
{
    int         column;
    int         contline;
    byte        caret;
    bool        was_listed;
    bool        save_list;
    char        buffer[ERR_BUFF_SIZE+1];
    char        buff[MAX_SYMLEN+1];

    ChkErrFile();
    save_list = SetLst( true );
    was_listed = WasStmtListed();
    caret = CarrotType( error );
    column = 0;
    contline = 0;
    if( (SrcRecNum != 0) && // consider error opening source file
        (ProgSw & PS_SYMTAB_PROCESS) == 0 &&
        (ProgSw & PS_END_OF_SUBPROG) == 0 ) {
        if( StmtSw & SS_SCANNING ) {
            column = LexToken.col + 1;
            contline = LexToken.line;
        } else {
            // If the message does not require a caret, then it is
            // possible to process an error when "CITNode" is NULL or
            // the "oprpos/opnpos" fields are meaningless.
            // Consider:
            // c$notime=10       CITNode == NULL
            //       end
            // or
            //       a = 2.3
            // c$notime=10       "oprpos/opnpos" fields are meaningless
            //      & + 4.2
            //       end
            if( ( caret != NO_CARROT ) && ( CITNode->link != NULL ) ) {
                if( caret == OPR_CARROT ) {
                    column = CITNode->oprpos & 0xff;
                    contline = CITNode->oprpos >> 8;
                } else {
                    column = CITNode->opnpos & 0xff;
                    contline = CITNode->opnpos >> 8;
                }
            }
        }
Esempio n. 3
0
static void FiniCompile( void )
{
    SetLst( true ); // listing file on for statistics
    LFEndSrc();
    CloseErr();
}