Esempio n. 1
0
/*
 * GetFileName -- get filename from command line
 */
char *GetFileName( int pass )
{
    char        buff[CMD_LEN];

    WantEquals();
    GetItem( buff );
    return( pass == 1 ? NULL : DupStr( buff ) );
}
Esempio n. 2
0
static void GetInitCmd( int pass )
{
    char    cmd[CMD_LEN];

    WantEquals();
    SkipSpaces();
    GetRawItem( cmd );
    if( pass == 2 ) {
        _Free( InitCmdList );
        _Alloc( InitCmdList, strlen( cmd ) + 1 );
        StrCopy( cmd, InitCmdList );
    }
}
Esempio n. 3
0
/*
 * GetValueLong -- get a long numeric value from command line
 */
unsigned long GetValueLong( void )
{
    unsigned long val;

    WantEquals();
    if( !isdigit( CurrChar ) ) OptError( LIT( STARTUP_Invalid_Num ) );
    val = 0;
    do {
        val = val * 10 + CurrChar - '0';
        NextChar();
    } while( isdigit( CurrChar ) );
    return( val );
}
Esempio n. 4
0
bool ScreenOption( const char *start, unsigned len, int pass )
{
    char        *p;

    switch( Lookup( SysOptNameTab, start, len ) ) {
    case OPT_CONSOLE:
        _Free( DbgTerminal );
        DbgTerminal = GetFileName( pass );
        break;
    case OPT_XCONFIG:
        WantEquals();
        p = XConfig + strlen( XConfig );
        *p++ = ' ';
        GetRawItem( p );
        if( pass == 1 )
            XConfig[0] = NULLCHAR;
        break;
    default:
        return( false );
    }
    return( true );
}