Example #1
0
static int td_init( void )
/************************/
{
    int         rows, cols;
    const char  *tmp;

    if( UIData == NULL ) {
        UIData = &ui_data;
    }

    if( !td_initconsole() )
        return( FALSE );

    if( !initmonitor() )
        return( FALSE );

    if( TCAP_MONOCHROME ) {
        UIData->colour = M_TERMINFO_MONO;
    }

    UIData->no_blowup = TRUE;

    tmp = getenv( "TIOPTIMIZE" );
    if( tmp != NULL )
        OptimizeTerminfo = ( stricmp( tmp, "no" ) != 0 );

    // Figure out the number of columns to use
    cols = 0;
    tmp = getenv( "COLUMNS" );
    if( tmp != NULL )
        cols = strtoul( tmp, NULL, 0 );

    // Figure out the number of rows to use
    rows = 0;
    tmp = getenv( "LINES" );
    if( tmp != NULL )
        rows = strtoul( tmp, NULL, 0 );

    // Set up screen buffer
    if( !setupscrnbuff( rows, cols ) )
        return( FALSE );

    uiinitcursor();
    if( !initkeyboard() )
        return( FALSE );

    UIData->mouse_acc_delay = 277;
    UIData->mouse_rpt_delay = 100;
    UIData->mouse_clk_delay = 277;
    UIData->tick_delay      = 500;
    UIData->f10menus        = true;

    //find point at which repeat chars code becomes efficient
    ti_find_cutoff();

    ti_refresh( 1 );
    return( TRUE );
}
Example #2
0
static int td_init( void )
/************************/
{
    if (UIData == NULL) {
        UIData = &ui_data;
    }
    if( !td_initconsole() ) return( FALSE );

    if (!initmonitor()) return (FALSE);
    if (!setupscrnbuff(0,0)) return (FALSE);

    uiinitcursor();
    initkeyboard();
    UIData->mouse_acc_delay = 277;
    UIData->mouse_rpt_delay = 55;
    UIData->mouse_clk_delay = 277;
    UIData->tick_delay = 500;
    UIData->f10menus = TRUE;
    td_refresh(1);
    return (TRUE);
}