eg_elist.h File Reference


Detailed Description

Definition in file eg_elist.h.

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "eg_macros.h"

Include dependency graph for eg_elist.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  EGeList_t
 List Node Structure. More...

Defines

#define __EGeListAdd(new, prev_ptr, next_ptr)
 Insert a new entry between two known consecutive entries.
#define __EGeListLink(prev_ptr, next_ptr)
 Given two nodes, link them as if they would follow one another in the list (used to delete points from a list).
#define __EGeListSplice(list, head)
 move all elements in one list to the given location in a second list. Note that this function assumes that the list is represented by a pointer to an EGeList_t structure that act as a marker but that don't bellong to the list, and thus is not included in the joinded list.
#define __EL_DEBUG_   100
 debug level for lists
#define EGeListAddAfter(new, head)   __EGeListAdd(new,head,(head)->next)
 Insert a new entry after the given pointer.
#define EGeListAddBefore(new, tail)   __EGeListAdd(new,(tail)->prev,tail)
 Insert a new entry before the given pointer.
#define EGeListDel(entry)
 Given a node, eliminate it from the list it bellongs. but don't change the internal data in the eliminated list (be carefull, if you will use it afterwards, then you MUST initialize it). If debugging is enabled, then whenever you delete, the connector is reseted to 0xffffffff. What you can count on is that the connector won't be NULL after deleting it from the list, but it's values may be lost if we are debugging.
#define EGeListInit(name)
 Initialize a given structure to point to itself (in circular fashion).
#define EGeListIsEmpty(head)
 test whether a list is empty (i.e. he is its own next pointer)
#define EGeListMoveAfter(entry, head)
 Move an element from one list to another (deleting it from the original one).
#define EGeListMoveBefore(entry, tail)
 Move an element from one list to another (deleting it from the original one).
#define EGeListReplace(old, new)
 Replace one entry with another in a list.
#define EGeListSplice(list, head)   ({if(!EGeListIsEmpty(list)) __EGeListSplice(list,head);})

Typedefs

typedef EGeList_t EGeList_t
 List Node Structure.


Generated on Mon Jan 30 08:50:53 2006 for EGlib by  doxygen 1.4.5