fred-mod-eppd-2.20.2
|
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. | |
#define | q_next(_qhead) ((_qhead)->cur = ((_qhead)->cur) ? (_qhead)->cur->next : NULL) |
Shift to next item in a queue. | |
#define | q_content(_qhead) ((_qhead)->cur->content) |
Get content of current item. | |
#define | q_reset(_qhead) ((_qhead)->cur = (_qhead)->body) |
Reset current item to the first one. | |
#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... | |
#define q_foreach | ( | _qhead | ) | for ((_qhead)->cur = (_qhead)->body; (_qhead)->cur != NULL; (_qhead)->cur = (_qhead)->cur->next) |
Iterate through items in a list.
At first, internal pointer is set to the list begining then it advances each round to the next item in a list, until the sentinel is encountered.
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).
pool | Pool from which the new item will be allocated. |
head | The queue. |
data | Pointer to data which shoud be enqueued. |
References qhead::body, qitem::content, qhead::count, epp_malloc(), and qitem::next.
Referenced by epilog_failure(), info_contact_data_copy(), info_domain_data_copy(), info_keyset_data_copy(), info_nsset_data_copy(), new_error_item(), parse_create_keyset(), parse_create_nsset(), parse_update_keyset(), parse_update_nsset(), and xpath_getn().