extern void ProcessDefCommand( void ) /***********************************/ { if( !ProcessKeyword( DefStatements ) ) { if( MultiLine != NULL ) { (*MultiLine)(); } else { DirectiveError(); } } }
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 ); } } }
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 ); } } }
static void ProcExeType( void ) /*****************************/ { ProcessKeyword( ExeTypeKeywords ); // skip the keywords }