Changeset 1648


Ignore:
Timestamp:
02/06/12 03:31:18 (2 years ago)
Author:
reyalp
Message:

action stack cosmetic whitespace cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/action_stack.c

    r1647 r1648  
    3333            return 0; 
    3434    } 
    35      
     35 
    3636    return 1; 
    3737} 
     
    4444    if (num_stacks == MAX_ACTION_STACKS) 
    4545        return -1; 
    46          
     46 
    4747    // Initialize new action stack 
    4848    action_stack_t** tmp = (action_stack_t**)malloc(sizeof(action_stack_t*) * (num_stacks + 1)); 
     
    5050 
    5151    tmp[num_stacks] = (action_stack_t*)malloc(sizeof(action_stack_t)); 
    52      
     52 
    5353    action_stack_t* stack = tmp[num_stacks]; 
    5454    if(proc_func) { 
     
    6161    stack->comp_id = task_comp_id; 
    6262    stack->delay_target_ticks = 0; 
    63     stack->stack[0] = p;     
     63    stack->stack[0] = p; 
    6464 
    6565    action_stack_t** old = action_stacks; 
    6666    action_stacks = tmp; 
    6767    ++num_stacks; 
    68      
     68 
    6969    if (old != NULL) 
    7070        free(old); 
    71          
    72     // Increment task_comp_id, handle wraparound,  
     71 
     72    // Increment task_comp_id, handle wraparound, 
    7373    // and do not take values already in use 
    7474    do 
     
    8686    if (num_stacks > 1) 
    8787        tmp = (action_stack_t**)malloc(sizeof(action_stack_t*) * (num_stacks - 1)); 
    88      
     88 
    8989    int src_index, dst_index; 
    9090    for (src_index = 0, dst_index = 0; src_index < num_stacks; ++src_index) 
     
    100100        } 
    101101    } 
    102          
     102 
    103103    action_stack_t** old = action_stacks; 
    104104    --num_stacks; 
     
    112112    if (active_stack == -1) 
    113113        return; 
    114      
     114 
    115115    --(action_stacks[active_stack]->stack_ptr); 
    116116} 
     
    145145// WARNING stack program flow is reversed 
    146146    action_push_release(key); 
    147 #if defined(CAM_KEY_CLICK_DELAY) // camera need delay for click  
    148     action_push_delay(CAM_KEY_CLICK_DELAY);  
    149 #endif  
     147#if defined(CAM_KEY_CLICK_DELAY) // camera need delay for click 
     148    action_push_delay(CAM_KEY_CLICK_DELAY); 
     149#endif 
    150150    action_push_press(key); 
    151151} 
     
    165165 
    166166    action_stack_t* task = action_stacks[active_stack]; 
    167     task->stack[++task->stack_ptr] = p;     
     167    task->stack[++task->stack_ptr] = p; 
    168168} 
    169169 
     
    244244        if(action_process_delay(2) || (kbd_last_clicked = kbd_get_clicked_key())) 
    245245        { 
    246             if (!kbd_last_clicked)  
     246            if (!kbd_last_clicked) 
    247247                kbd_last_clicked=0xFFFF; 
    248248            action_clear_delay(); 
     
    272272        return 0; 
    273273    } 
    274      
     274 
    275275    return 1; 
    276276} 
Note: See TracChangeset for help on using the changeset viewer.