20 lines
386 B
C
20 lines
386 B
C
#include <ordinary.h>
|
|
#include <stdlib.h>
|
|
|
|
void ordinary_list_new(struct ordinary_list *list, uint32_t limit) {
|
|
list->head = NULL;
|
|
list->tail = NULL;
|
|
list->count = 0;
|
|
list->limit = limit;
|
|
}
|
|
|
|
void ordinary_list_del(struct ordinary_list *list) {
|
|
struct ordinary_node *at = list->head;
|
|
|
|
while(at) {
|
|
struct ordinary_node *next = at->next;
|
|
free(at);
|
|
at = next;
|
|
}
|
|
}
|