merge fix

This commit is contained in:
Dane MacFadden
2025-07-25 19:06:44 -06:00
commit 1e7bf3f5e0
14 changed files with 947 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#include <list.h>
#include <stddef.h>
int ListCount(LIST *list) {
return (int) list->size;
}
void *ListFirst(LIST *list) {
if (list->size != 0) {
list->current = list->head;
return list->current->data;
}
return NULL;
}
void *ListLast(LIST *list) {
if (list->size != 0) {
list->current = list->tail;
return list->current->data;
}
return NULL;
}
void *ListNext(LIST *list) {
if (list->current->next != NULL) {
list->current = list->current->next;
return list->current->data;
}
return NULL;
}
void *ListPrev(LIST *list) {
if (list->current->next != NULL) {
list->current = list->current->previous;
return list->current->data;
}
return NULL;
}
void *ListCurr(LIST *list) {
if (list->current != NULL) {
return list->current->data;
}
return NULL;
}