Seeding from the 1.2 tree.

This commit is contained in:
Dan Mashal
2013-01-01 03:00:55 -08:00
parent d8c87c4ded
commit 87b806a563
1424 changed files with 260320 additions and 0 deletions

44
dll/aim/toc/ll.h Normal file
View File

@@ -0,0 +1,44 @@
#ifndef _LL_H
#define _LL_H
/*
* Really bad list implementation
*/
#define TLL(list,e) e = list->head->next; e; e = e->next
struct _lle {
char *key;
void *data;
struct _lle *next;
};
typedef struct _lle * LLE;
struct _ll {
LLE head;
LLE curr;
void (*free_e)(void *);
int items;
};
typedef struct _ll * LL;
LL CreateLL();
void SetFreeLLE(LL List, void (*free_e)(void *));
LLE CreateLLE (char *key, void *data, LLE next);
int AddToLL(LL List, char *key, void *data);
LLE FindInLL(LL List, char *key);
void *GetDataFromLLE(LLE e);
int RemoveFromLL(LL List, LLE e);
int RemoveFromLLByKey(LL List, char *key);
LLE GetNextLLE(LL List);
void ResetLLPosition(LL List);
void FreeLLE(LLE e, void (*free_e)(void *));
void FreeLL(LL List);
/* Internal */
#endif // _LL_H