private.h 440 B

123456789101112131415161718
  1. #include "faux/list.h"
  2. struct faux_list_node_s {
  3. faux_list_node_t *prev;
  4. faux_list_node_t *next;
  5. void *data;
  6. };
  7. struct faux_list_s {
  8. faux_list_node_t *head;
  9. faux_list_node_t *tail;
  10. bool_t sorted;
  11. bool_t unique;
  12. faux_list_cmp_fn cmpFn; // Function to compare two list elements
  13. faux_list_kcmp_fn kcmpFn; // Function to compare key and list element
  14. faux_list_free_fn freeFn; // Function to properly free data field
  15. size_t len;
  16. };