#ifndef __LINKLIST_H
#define __LINKLIST_H

/* Define linklist structure */
typedef struct s_LinkList *p_LinkList;
typedef struct s_LinkListHead *p_LinkListHead;

/* A link list node */
typedef struct s_LinkList {	p_LinkList next;			/* next pointer */
										p_LinkList prev;			/* previous pointer */
										p_LinkListHead head;		/* base header pointer */
										void *data;					/* a data block */
									} *p_LinkList;

/* A link list header */
typedef struct s_LinkListHead {	p_LinkList start;		/* start pointer */
											p_LinkList end;		/* end pointer */
											int entries;			/* number of entries */
										} *p_LinkListHead;

/* Some externs */
extern p_LinkListHead LinkList_Create(void);
extern void LinkList_Destroy(p_LinkListHead /*this*/);
extern p_LinkList LinkList_Add(p_LinkListHead /*this*/,void * /*block*/);
extern void LinkList_Remove(p_LinkList /*position*/);

#endif
