aboutsummaryrefslogtreecommitdiff
path: root/src/references.h
blob: 28937f1a66e5beae93193636b29c5ffdfa827625 (plain)
  1. #ifndef _REFERENCES_H_
  2. #define _REFERENCES_H_
  3. #define REFMAP_SIZE 16
  4. struct reference {
  5. struct reference *next;
  6. unsigned char *label;
  7. unsigned char *url;
  8. unsigned char *title;
  9. unsigned int hash;
  10. };
  11. typedef struct reference reference;
  12. struct reference_map {
  13. reference *table[REFMAP_SIZE];
  14. };
  15. typedef struct reference_map reference_map;
  16. reference_map *reference_map_new(void);
  17. void reference_map_free(reference_map *map);
  18. reference* reference_lookup(reference_map *map, chunk *label);
  19. extern void reference_create(reference_map *map, chunk *label, chunk *url, chunk *title);
  20. #endif