fred-mod-eppd-2.16.0
Data Structures | Macros | Typedefs | Functions
Queue structure and utilities

Data Structures

struct  qitem
 Queue item type. More...
 
struct  qhead
 Queue structure used on countless places throughout the program. More...
 

Macros

#define q_length(_qhead)   ((_qhead).count)
 Get length of a queue. More...
 
#define q_next(_qhead)   ((_qhead)->cur = ((_qhead)->cur) ? (_qhead)->cur->next : NULL)
 Shift to next item in a queue. More...
 
#define q_content(_qhead)   ((_qhead)->cur->content)
 Get content of current item. More...
 
#define q_reset(_qhead)   ((_qhead)->cur = (_qhead)->body)
 Reset current item to the first one. More...
 
#define q_foreach(_qhead)   for ((_qhead)->cur = (_qhead)->body; (_qhead)->cur != NULL; (_qhead)->cur = (_qhead)->cur->next)
 Iterate through items in a list. More...
 

Typedefs

typedef struct qitem qitem
 Queue item type.
 

Functions

int q_add (void *pool, qhead *head, void *data)
 Add new item to a queue (the item will be enqueued at the end of queue). More...
 

Detailed Description

Macro Definition Documentation

#define q_content (   _qhead)    ((_qhead)->cur->content)
#define q_foreach (   _qhead)    for ((_qhead)->cur = (_qhead)->body; (_qhead)->cur != NULL; (_qhead)->cur = (_qhead)->cur->next)
#define q_length (   _qhead)    ((_qhead).count)
#define q_next (   _qhead)    ((_qhead)->cur = ((_qhead)->cur) ? (_qhead)->cur->next : NULL)

Shift to next item in a queue.

Referenced by epp_gen_response().

#define q_reset (   _qhead)    ((_qhead)->cur = (_qhead)->body)

Reset current item to the first one.

Referenced by epp_gen_response().

Function Documentation

int q_add ( void *  pool,
qhead head,
void *  data 
)