This shows you the differences between two versions of the page.
sssssss [2013/01/23 00:30] aleksandar.mladenovic |
sssssss [2013/01/23 00:34] (current) aleksandar.mladenovic |
||
---|---|---|---|
Line 27: | Line 27: | ||
---- | ---- | ||
+ | ==== pl_list.h ==== | ||
+ | <file c pl_list.h> | ||
+ | |||
+ | #define TRUE 1 | ||
+ | #define FALSE 0 | ||
+ | |||
+ | typedef enum { lsBOLP = 0, lsEOLP, lsCURRENT } TListStatus; | ||
+ | struct SListElement | ||
+ | { | ||
+ | void *pData; | ||
+ | struct SListElement *pNext; | ||
+ | }; | ||
+ | |||
+ | struct SList | ||
+ | { | ||
+ | TListStatus lsStatus; | ||
+ | struct SListElement *pHead; | ||
+ | struct SListElement *pCurrent; | ||
+ | void (*destructor) (void *); | ||
+ | }; | ||
+ | |||
+ | typedef struct SListElement TListElement; | ||
+ | typedef struct SList TList; | ||
+ | |||
+ | void initialize_list (TList *pList, void (*destructor) (void *)); | ||
+ | void find_bolp (TList *pList); | ||
+ | int move_forward (TList *pList); | ||
+ | int insert (TList *pList, void *pData); | ||
+ | void *get (TList *pList); | ||
+ | void destroy_list (TList *pList); | ||
+ | int eolp (TList *pList); | ||
+ | </file> |