list.h
Go to the documentation of this file.00001 #ifndef LIST_H_
00002 #define LIST_H_
00003
00004 #include "../shared/ufotypes.h"
00005
00006 typedef struct linkedList_s {
00007 byte *data;
00008 struct linkedList_s *next;
00009 qboolean ptr;
00010 } linkedList_t;
00011
00012 void LIST_AddString(linkedList_t** list, const char* data);
00013 void LIST_AddPointer(linkedList_t** listDest, void* data);
00014 linkedList_t* LIST_Add(linkedList_t** list, const byte* data, size_t length);
00015 const linkedList_t* LIST_ContainsString(const linkedList_t* list, const char* string);
00016 linkedList_t* LIST_GetPointer(linkedList_t* list, const void* data);
00017 void LIST_Delete(linkedList_t **list);
00018 void LIST_RemoveEntry(linkedList_t **list, linkedList_t *entry);
00019 qboolean LIST_IsEmpty(const linkedList_t *list);
00020 int LIST_Count(const linkedList_t *list);
00021 void *LIST_GetByIdx(linkedList_t *list, int index);
00022 void *LIST_GetLast(linkedList_t *list);
00023 qboolean LIST_Remove(linkedList_t **list, const void *data);
00024 void *LIST_GetNext(linkedList_t *list, void *lastData);
00025
00026 #endif