Changeset 39

Show
Ignore:
Timestamp:
05/04/06 12:21:46 (8 years ago)
Author:
jesus
Message:

add hashes are remove a line of debugging

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/config.c

    r38 r39  
    417417  for(node=lf->modulelog; node; node=node->next) { 
    418418    if(!node->module) node->module = module_get(node->module_name); 
    419 fprintf(stderr, "running %s [%p]\n", node->module_name, node->module); 
    420419    if(node->module) node->module->logline(sc, sender, group, message); 
    421420  } 
  • trunk/makefile

    r38 r39  
    3939 
    4040OBJS=lex.sld_.o y.tab.o config.o hash.o timefuncs.o module.o $(PERL_OBJS) 
    41 LSLOBJS=skiplist.o 
     41LSLOBJS=skiplist.o echash.o 
    4242 
    4343all:    spreadlogd 
  • trunk/skiplist.c

    r38 r39  
    4040  sl->size=0; 
    4141  sl->top = NULL; 
    42   sl->bottom = NULL; 
     42  sl->bottom = NULL; 
    4343  sl->index = NULL; 
    4444} 
     
    294294  } 
    295295  free(stack); 
     296  sl->size++; 
    296297  if(sl->index != NULL) { 
    297298    /* this is a external insertion, we must insert into each index as well */ 
     
    308309      li = ni; 
    309310    } 
    310   } else { 
    311     sl->size++; 
    312311  } 
    313312#ifdef SLDEBUG 
     
    452451  if(!m) return 0; 
    453452  if(m->nextindex) sli_remove(m->nextindex->sl, m->nextindex, NULL); 
    454   else sl->size--; 
     453  sl->size--; 
    455454#ifdef SLDEBUG 
    456455  sl_print_struct(sl, "BR:"); 
  • trunk/skiplist.h

    r38 r39  
    8989                    SkiplistComparator comp); 
    9090 
     91static inline void *sl_peek(Skiplist * a) 
     92{ 
     93  struct skiplistnode *sln; 
     94  sln = sl_getlist(a); 
     95  if (sln) 
     96    return sln->data; 
     97  return NULL; 
     98} 
     99 
     100static inline void *sl_pop(Skiplist * a, FreeFunc myfree) 
     101{ 
     102  struct skiplistnode *sln; 
     103  void *data = NULL; 
     104  sln = sl_getlist(a); 
     105  if (sln) { 
     106    data = sln->data; 
     107    sli_remove(a, sln, myfree); 
     108  } 
     109  return data; 
     110} 
     111 
    91112#endif