bb
This commit is contained in:
parent
a32b211d20
commit
5018ccbbb0
13 changed files with 5549 additions and 0 deletions
21
text_rendering/hash.h
Normal file
21
text_rendering/hash.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue