Exemplo n.º 1
0
static void GrowTable( file_table *tab )
/**************************************/
{
    tab->len++;
    if( !(tab->len & VBL_ARRAY_MASK) ) {        // it will overflow
        tab->tab = DWRREALLOC( tab->tab,
                   (tab->len + VBL_ARRAY_DELTA) * sizeof(filetab_entry) );
    }
}
Exemplo n.º 2
0
void DWRStackPush(                          // PUSH ITEM ON THE STACK
    dr_stack *stk,                          // -- stack to push on
    uint_32 val )                           // -- value to push
/***********************/
{
    if( stk->free >= stk->size ) {
        stk->size *= 2;
        stk->stack = DWRREALLOC( stk->stack, stk->size * sizeof( uint_32 ) );
    }

    stk->stack[stk->free] = val;
    stk->free += 1;
}
Exemplo n.º 3
0
static void ScopePush( dr_scope_stack *stack, dr_handle entry )
/*************************************************************/
{
    if( stack->stack == NULL ) {
        stack->stack = DWRALLOC( SCOPE_GUESS * sizeof( dr_handle ) );
    }
    if( stack->free >= stack->size ) {
        stack->size += SCOPE_GUESS;
        stack->stack = DWRREALLOC( stack->stack, stack->size * sizeof( dr_handle ) );
    }

    stack->stack[stack->free] = entry;
    stack->free += 1;
}
Exemplo n.º 4
0
static void DWRTrimTableSize( file_table *tab )
/*********************************************/
{
    tab->tab = DWRREALLOC( tab->tab, tab->len * sizeof(filetab_entry) );
}