Defines

clist.h File Reference

SIP-router core :: circular list maintenance macros. More...

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

Go to the source code of this file.

Defines


Detailed Description

Module: SIP-router core

Definition in file clist.h.


Define Documentation

#define clist_append_sublist (   head,
  s,
  e,
  next,
  prev 
)
Value:
do{ \
                (s)->prev=(head)->prev; \
                (e)->next=(void*)(head); \
                (s)->prev->next=(s); \
                (head)->prev=(e);   \
        }while(0)

WARNING: clist_append_sublist(head, n, n->prev, ...) won't work, (macro!), use e=n->prev; clist_append_sublist(head, n, e, ...) instead!

Definition at line 75 of file clist.h.

#define clist_foreach_safe (   head,
  v,
  bak,
  dir 
)
Value:
for((v)=(head)->dir, (bak)=(v)->dir; (v)!=(void*)(head); \
                                (v)=(bak), (bak)=(v)->dir)

var) (it allows removing of the current element)

Definition at line 124 of file clist.h.

#define clist_insert_sublist (   head,
  s,
  e,
  next,
  prev 
)
Value:
do{ \
                (s)->prev=(void*)(head); \
                (e)->next=(head)->next; \
                (e)->next->prev=(e); \
                (head)->next=s;   \
        }while(0)
Note:
WARNING: clist_insert_sublist(head, n, n->prev) won't work, same for clist_insert_sublist(head, n->next, n) (macro!), use e=n->prev; clist_insert_sublist(head, n, e, ...) instead!

Definition at line 58 of file clist.h.