コード例 #1
0
extern void ProcessDefCommand( void )
/***********************************/
{
    if( !ProcessKeyword( DefStatements ) ) {
        if( MultiLine != NULL ) {
            (*MultiLine)();
        } else {
            DirectiveError();
        }
    }
}
コード例 #2
0
static void ProcCode( void )
/**************************/
{
    char    buffer[ CODE_BUFFER_LEN ];
    char *  result;
    int     len;

    memcpy( buffer, "segment type code", 17 );
    OptionBuffer = buffer + 17;
    BufferLeft = CODE_BUFFER_LEN - 18;
    if( !ProcessKeyword( CodeAttributes ) ) {
        Warning( "argument for code statement not valid", OPTION_SLOT );
    } else {    // get the rest of the attributes.
        while( ProcessKeyword( CodeAttributes ) ) {}     // NULL statement.
        if( BufferLeft != CODE_BUFFER_LEN - 18 ) {      // attribute spec'd.
            len = CODE_BUFFER_LEN - BufferLeft - 1;
            result = MemAlloc( CODE_BUFFER_LEN - BufferLeft + 1);
            memcpy( result, buffer, len );
            *(result + len) = '\0';
            AddCommand( result, OPTION_SLOT, FALSE );
        }
    }
}
コード例 #3
0
static void ProcData( void )
/**************************/
// NYI: serious copied code from ProcCode.  Should be united into one routine.
{
    char    buffer[ CODE_BUFFER_LEN ];
    char *  result;
    int     len;

    memcpy( buffer, "segment type data", 17 );
    OptionBuffer = buffer + 17;
    BufferLeft = CODE_BUFFER_LEN - 18;
    if( !ProcessKeyword( DataAttributes ) ) {
        Warning( "argument for data statement not valid", OPTION_SLOT );
    } else {    // get the rest of the attributes.
        while( ProcessKeyword( DataAttributes ) ) {}     // NULL statement.
        if( BufferLeft != CODE_BUFFER_LEN - 18 ) {      // attribute spec'd.
            len = CODE_BUFFER_LEN - BufferLeft - 1;
            result = MemAlloc( CODE_BUFFER_LEN - BufferLeft + 1);
            memcpy( result, buffer, len );
            *(result + len) = '\0';
            AddCommand( result, OPTION_SLOT, FALSE );
        }
    }
}
コード例 #4
0
static void ProcExeType( void )
/*****************************/
{
    ProcessKeyword( ExeTypeKeywords );           // skip the keywords
}