diff options
Diffstat (limited to 'include/idlist.h')
-rw-r--r-- | include/idlist.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/include/idlist.h b/include/idlist.h index 3318be4..c006a32 100644 --- a/include/idlist.h +++ b/include/idlist.h @@ -1,13 +1,22 @@ +/* + * idlist.h + * + * IDList - List datatype implementation. Element can be taken by id only. + * + * IDList is used by the Painter module and loadable texts. + * + * */ + struct idlist { - unsigned long id; - void *obj; - struct idlist *next; - struct idlist *prev; + size_t id; + void *obj; + struct idlist *next; + struct idlist *prev; }; -struct idlist *list_new(); -struct idlist *list_append(struct idlist *list); -struct idlist *list_get(const struct idlist *list, unsigned long id); -void list_rm_node(struct idlist *node); -void list_foreach(struct idlist *list, void (*job)(void *)); -void list_destroy(struct idlist *list); +struct idlist *list_new(); +struct idlist *list_append(struct idlist *list); +struct idlist *list_get(const struct idlist *list, size_t id); +void list_rm_node(struct idlist *node); +void list_foreach(struct idlist *list, void (*job)(void *)); +void list_destroy(struct idlist *list); |