This commit is contained in:
Alessandro Mauri 2023-02-12 09:34:44 +01:00
parent a32b211d20
commit 5018ccbbb0
13 changed files with 5549 additions and 0 deletions

21
text_rendering/hash.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef _HASH_H
#define _HASH_H
struct hm_entry {
unsigned long code;
void *data;
};
struct hm_ref {
unsigned int items, size;
struct hm_entry bucket[];
};
struct hm_ref * hm_create(unsigned int size);
void hm_destroy(struct hm_ref *hm);
struct hm_entry * hm_search(struct hm_ref *hm, unsigned int code);
struct hm_entry * hm_insert(struct hm_ref *hm, struct hm_entry *entry);
#endif