Ignore:
Timestamp:
Jun 28, 2008, 1:22:26 PM (12 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Removed general local variables from main() and put it in struct screen_list
  • Moved most of the input handling to input.c
  • Moved lock feature to lock.c
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/recurrent.c

    r2473 r2495  
    2929
    3030#include "neercs.h"
     31
     32
     33int handle_recurrents(struct screen_list* screen_list)
     34{
     35    int refresh = 0, i;
     36    /* Recurrent functions */
     37    for(i=0; i<screen_list->recurrent_list->count; i++)
     38    {
     39        if(screen_list->recurrent_list->recurrent[i]->function)
     40        {
     41            refresh |= screen_list->recurrent_list->recurrent[i]->function(screen_list,
     42                                                                           screen_list->recurrent_list->recurrent[i],
     43                                                                           screen_list->recurrent_list->recurrent[i]->user,
     44                                                                           get_us());
     45        }
     46    }
     47    /* Delete recurrent functions */
     48    for(i=0; i<screen_list->recurrent_list->count; i++)
     49    {
     50        if(screen_list->recurrent_list->recurrent[i]->kill_me)
     51        {
     52            remove_recurrent(screen_list->recurrent_list, i);
     53            i = 0;
     54        }
     55    }
     56    return refresh;
     57}
     58
    3159
    3260/* Add recurrent function. It will be called at each main loop iteration, unless it is removed */
Note: See TracChangeset for help on using the changeset viewer.