xlib_playground

Xlib playground for experiments.
Log | Files | Refs

list.h (550B)


      1 /* Linked list. An empty list must be initialized with NULL. */
      2 typedef struct List {
      3 	struct List *next;
      4 	void *item;
      5 } List;
      6 
      7 List * laddfront(List *p, void *item);
      8 void lfree(List *p);
      9 int get_list_count(void);
     10 void lfreei(List *p, void (* ifree)(void *));
     11 void lprint(List *p, void (* pfnc)(void *));
     12 int lbsort(List *p, int (* cmp)(void *, void *));
     13 int lqsort(List *p, int (* cmp)(void *, void *));
     14 void lswap(List *p, List *q);
     15 int leqa(List *p, List *q);
     16 int leqi(List *p, List *q, int (*eq)(void *, void *));
     17 unsigned long int llen(List *);