#include #include uint8_t ordinary_list_empty(struct ordinary_list *list) { return !list->head; } uint8_t ordinary_list_full(struct ordinary_list *list) { return !list->limit || list->count == list->limit; } struct ordinary_node *ordinary_list_at(struct ordinary_list *list, uint32_t idx) { struct ordinary_node *node = list->head; for(; node; node = node->next) { idx -= 1; if(!idx) { return node; } } return NULL; }