ZE-Standard-Libraries/list/list_info.c

13 lines
414 B
C
Raw Normal View History

2018-08-23 16:57:38 +00:00
#include <type.h>
#include <list/list.h>
unsigned long long len(List *p_list) {
return p_list->length;
}
int isListEmpty(List *p_list) {
if (p_list->head == NULL || p_list->tail == NULL)// If its head or tail is NULL,it would be thought as empty.
return 1; // But we should ensure that both of them are NULL when we
return 0; // want to make a list empty.
}