ReactOS  0.4.14-dev-323-g6fe6a88
dplayx_queue.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
Include dependency graph for dplayx_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DPQ_INSERT(a, b, c)   DPQ_INSERT_IN_TAIL(a,b,c)
 
#define DPQ_HEAD(type)
 
#define DPQ_ENTRY(type)
 
#define DPQ_INIT(head)
 
#define DPQ_FIRST(head)   ( (head).lpQHFirst )
 
#define DPQ_IS_EMPTY(head)   ( DPQ_FIRST(head) == NULL )
 
#define DPQ_NEXT(elem)   (elem).lpQNext
 
#define DPQ_IS_ENDOFLIST(elem)   ( DPQ_NEXT(elem) == NULL )
 
#define DPQ_INSERT_IN_TAIL(head, elm, field)
 
#define DPQ_REMOVE(head, elm, field)
 
#define DPQ_FIND_ENTRY(head, elm, field, fieldCompareOperator, fieldToCompare, rc)
 
#define DPQ_FIND_ENTRY_CB(head, elm, field, compare_cb, fieldToCompare, rc)
 
#define DPQ_DECL_COMPARECB(name, type)   BOOL name( const type* elem1, const type* elem2 )
 
#define DPQ_REMOVE_ENTRY(head, elm, field, fieldCompareOperator, fieldToCompare, rc)
 
#define DPQ_REMOVE_ENTRY_CB(head, elm, field, compare_cb, fieldToCompare, rc)
 
#define DPQ_DELETEQ(head, field, type, df)
 
#define DPQ_DECL_DELETECB(name, type)   void name( type elem )
 

Functions

 DPQ_DECL_DELETECB (cbDeleteElemFromHeap, LPVOID) DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ DPQ_DECL_COMPARECB

#define DPQ_DECL_COMPARECB (   name,
  type 
)    BOOL name( const type* elem1, const type* elem2 )

Definition at line 151 of file dplayx_queue.h.

◆ DPQ_DECL_DELETECB

#define DPQ_DECL_DELETECB (   name,
  type 
)    void name( type elem )

Definition at line 211 of file dplayx_queue.h.

◆ DPQ_DELETEQ

#define DPQ_DELETEQ (   head,
  field,
  type,
  df 
)
Value:
do \
{ \
while( !DPQ_IS_EMPTY(head) ) \
{ \
type holder = DPQ_FIRST(head); \
DPQ_REMOVE( head, holder, field ); \
df( holder ); \
} \
} while(0)
#define DPQ_IS_EMPTY(head)
Definition: dplayx_queue.h:64
struct outqueuenode * head
Definition: adnsresfilter.c:66
Definition: parser.c:43
#define DPQ_FIRST(head)
Definition: dplayx_queue.h:61

Definition at line 199 of file dplayx_queue.h.

◆ DPQ_ENTRY

#define DPQ_ENTRY (   type)
Value:
struct { \
struct type *lpQNext; /* next element */ \
struct type **lpQPrev; /* address of previous next element */ \
}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Definition at line 45 of file dplayx_queue.h.

◆ DPQ_FIND_ENTRY

#define DPQ_FIND_ENTRY (   head,
  elm,
  field,
  fieldCompareOperator,
  fieldToCompare,
  rc 
)
Value:
do { \
(rc) = DPQ_FIRST(head); /* NULL head? */ \
while( rc ) \
{ \
/* What we're searching for? */ \
if( (rc)->field fieldCompareOperator (fieldToCompare) ) \
{ \
break; /* rc == correct element */ \
} \
\
/* End of list check */ \
if( ( (rc) = (rc)->elm.lpQNext ) == (head).lpQHFirst ) \
{ \
rc = NULL; \
break; \
} \
} \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
while(1)
Definition: macro.lex.yy.c:740
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:43
#define DPQ_FIRST(head)
Definition: dplayx_queue.h:61

Definition at line 100 of file dplayx_queue.h.

◆ DPQ_FIND_ENTRY_CB

#define DPQ_FIND_ENTRY_CB (   head,
  elm,
  field,
  compare_cb,
  fieldToCompare,
  rc 
)
Value:
do { \
(rc) = DPQ_FIRST(head); /* NULL head? */ \
while( rc ) \
{ \
/* What we're searching for? */ \
if( compare_cb( &((rc)->field), &(fieldToCompare) ) ) \
{ \
break; /* no more */ \
} \
\
/* End of list check */ \
if( ( (rc) = (rc)->elm.lpQNext ) == (head).lpQHFirst ) \
{ \
rc = NULL; \
break; \
} \
} \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
while(1)
Definition: macro.lex.yy.c:740
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:43
#define DPQ_FIRST(head)
Definition: dplayx_queue.h:61

Definition at line 129 of file dplayx_queue.h.

◆ DPQ_FIRST

#define DPQ_FIRST (   head)    ( (head).lpQHFirst )

Definition at line 61 of file dplayx_queue.h.

◆ DPQ_HEAD

#define DPQ_HEAD (   type)
Value:
struct { \
struct type *lpQHFirst; /* first element */ \
struct type **lpQHLast; /* addr of last next element */ \
}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Definition at line 39 of file dplayx_queue.h.

◆ DPQ_INIT

#define DPQ_INIT (   head)
Value:
do{ \
(head).lpQHFirst = NULL; \
(head).lpQHLast = &(head).lpQHFirst; \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
smooth NULL
Definition: ftsmooth.c:416

Definition at line 54 of file dplayx_queue.h.

◆ DPQ_INSERT

#define DPQ_INSERT (   a,
  b,
  c 
)    DPQ_INSERT_IN_TAIL(a,b,c)

Definition at line 34 of file dplayx_queue.h.

◆ DPQ_INSERT_IN_TAIL

#define DPQ_INSERT_IN_TAIL (   head,
  elm,
  field 
)
Value:
do { \
(elm)->field.lpQNext = NULL; \
(elm)->field.lpQPrev = (head).lpQHLast; \
*(head).lpQHLast = (elm); \
(head).lpQHLast = &(elm)->field.lpQNext; \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:43

Definition at line 73 of file dplayx_queue.h.

◆ DPQ_IS_EMPTY

#define DPQ_IS_EMPTY (   head)    ( DPQ_FIRST(head) == NULL )

Definition at line 64 of file dplayx_queue.h.

◆ DPQ_IS_ENDOFLIST

#define DPQ_IS_ENDOFLIST (   elem)    ( DPQ_NEXT(elem) == NULL )

Definition at line 69 of file dplayx_queue.h.

◆ DPQ_NEXT

#define DPQ_NEXT (   elem)    (elem).lpQNext

Definition at line 67 of file dplayx_queue.h.

◆ DPQ_REMOVE

#define DPQ_REMOVE (   head,
  elm,
  field 
)
Value:
do { \
if (((elm)->field.lpQNext) != NULL) \
(elm)->field.lpQNext->field.lpQPrev = \
(elm)->field.lpQPrev; \
else \
(head).lpQHLast = (elm)->field.lpQPrev; \
*(elm)->field.lpQPrev = (elm)->field.lpQNext; \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:43

Definition at line 82 of file dplayx_queue.h.

◆ DPQ_REMOVE_ENTRY

#define DPQ_REMOVE_ENTRY (   head,
  elm,
  field,
  fieldCompareOperator,
  fieldToCompare,
  rc 
)
Value:
do { \
DPQ_FIND_ENTRY( head, elm, field, fieldCompareOperator, fieldToCompare, rc );\
\
/* Was the element found? */ \
if( rc ) \
{ \
DPQ_REMOVE( head, rc, elm ); \
} \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
Definition: parser.c:43

Definition at line 162 of file dplayx_queue.h.

◆ DPQ_REMOVE_ENTRY_CB

#define DPQ_REMOVE_ENTRY_CB (   head,
  elm,
  field,
  compare_cb,
  fieldToCompare,
  rc 
)
Value:
do { \
DPQ_FIND_ENTRY_CB( head, elm, field, compare_cb, fieldToCompare, rc );\
\
/* Was the element found? */ \
if( rc ) \
{ \
DPQ_REMOVE( head, rc, elm ); \
} \
} while(0)
struct outqueuenode * head
Definition: adnsresfilter.c:66
Definition: parser.c:43

Definition at line 181 of file dplayx_queue.h.

Function Documentation

◆ DPQ_DECL_DELETECB()

DPQ_DECL_DELETECB ( cbDeleteElemFromHeap  ,
LPVOID   
)

Definition at line 197 of file dplay.c.

198 {
199  HeapFree( GetProcessHeap(), 0, elem );
200 }
static size_t elem
Definition: string.c:68
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394