Esempio n. 1
0
static void WriteOptions( switch_entry *entry )
/*********************************************/
{
    char        help_line[80];
    int         i = 0;
    const char  *kw;

    for( ; entry->keyword; ++entry ) {
        help_line[i++] = ' ';
        help_line[i++] = ' ';
        help_line[i++] = '/';
        for( kw = entry->keyword; *kw != '\0'; ++kw ) {
            help_line[i++] = *kw;
        }
        if( i < 31 ) {
            while( i < 31 ) {   // pad to second column
                help_line[i++] = ' ';
            }
        } else {
            help_line[i] = '\0';
            i = 0;
            CommandOut( help_line );
        }
    }
    if( i ) {
        help_line[i] = '\0';
        CommandOut( help_line );
    }
}
Esempio n. 2
0
static void WriteOptions( switch_entry *entry )
/*********************************************/
{
    char        help_line[80];
    int         i = 0;
    const char  *kw;

    while( entry->keyword ) {
        help_line[i++] = ' ';
        help_line[i++] = ' ';
        help_line[i++] = '/';
        kw = entry->keyword;
        while( *kw )
            help_line[i++] = *kw++;
        if( i < 31 ) {  
            while( i < 31 ) // pad to second column
                help_line[i++] = ' ';
        } else {
            help_line[i] = '\0';
            i = 0;
            CommandOut( help_line );
        }
        ++entry;
    }
    if( i ) {
        help_line[i] = '\0';
        CommandOut( help_line );
    }
}
Esempio n. 3
0
static void ListWrite( cmdentry *cmdlist )
/****************************************/
// write out a list of commands without a prefix.
{
    for( ; cmdlist != NULL; cmdlist = cmdlist->next ) {
        CommandOut( cmdlist->command );
    }
}
Esempio n. 4
0
static void PrefixWrite( cmdentry *cmdlist, char *prefix, int len )
/*****************************************************************/
{
    char        buffer[FNMAX + 14];
    char *      after;

    if( cmdlist != NULL ) {
        memcpy( buffer, prefix, len );
        after = buffer + len;       // the spot after the prefix.
        for(; cmdlist != NULL; cmdlist = cmdlist->next ) {
            if( cmdlist->asis ) {
                CommandOut( cmdlist->command );
            } else {
                memcpy( after, cmdlist->command, strlen(cmdlist->command) + 1);
                CommandOut( buffer );
            }
        }
    }
}
Esempio n. 5
0
static void BuildWATCOM( void )
/*****************************/
// generate a watcom linker command file & write it to the screen.
{
    char *  form;

    CommandOut( "# This file produced by MS2WLINK" );
    if( DebugInfo ) {
        CommandOut( "debug all" );
    }
    ImplyFormat( HaveDefFile ? FMT_OS2 : FMT_DOS );
    if( FmtInfo != NO_EXTRA ) {
        form = Msg3Splice( "system ", FormatNames[FmtType], ExtraNames[FmtInfo - 1] );
    } else {
        form = Msg2Splice( "system ", FormatNames[FmtType] );
    }
    CommandOut( form );
    MemFree( form );
    PrefixWrite( Commands[OBJECT_SLOT], "file ", 5 );
    if( Commands[OVERLAY_SLOT] != NULL ) {
        CommandOut( "begin" );
        PrefixWrite( Commands[OVERLAY_SLOT], "    file ", 9 );
        CommandOut( "end" );
    }
    PrefixWrite( Commands[RUN_SLOT], "name ", 5 );
    if( Commands[MAP_SLOT] != NULL ) {
        PrefixWrite( Commands[MAP_SLOT], "option map=", 11 );
        MapOption = false;     // make sure it isn't generated a second time.
    }
    PrefixWrite( Commands[LIBRARY_SLOT], "library ", 8 );
    if( MapOption ) {
        CommandOut( "option map" );
    }
    ListWrite( Commands[OPTION_SLOT] );
}
Esempio n. 6
0
extern void WriteHelp( void )
/***************************/
{
    CommandOut( TheHelp );
}