- Added a little more dll level debugging and small changes
[wine.git] / dlls / dplayx / dplayx_queue.h
blobb4656c38a361c3b2f6bfab1ed085390a2b9b7996
2 /* Helper functions for TAILQ functions defined in <sys/queue.h>
3 *
4 * Blame any implementation mistakes on Peter Hunnisett
5 * <hunnise@nortelnetworks.com>
6 */
8 #ifndef __WINE_DPLAYX_QUEUE_H
9 #define __WINE_DPLAYX_QUEUE_H
11 #include <sys/queue.h>
13 /* head - pointer to TAILQ_HEAD struct
14 * elm - how to find the next element
15 * field - to be concatenated to rc to compare with fieldToEqual
16 * fieldToEqual - The value that we're looking for
17 * rc - Variable to put the return code. Same type as (head)->tqh_first
19 #define TAILQ_FIND_ENTRY( head, elm, field, fieldToEqual, rc ) { \
20 (rc) = (head)->tqh_first; /* NULL head? */ \
22 while( rc ) \
23 { \
24 /* What we're searching for? */ \
25 if( (rc)->field == (fieldToEqual) ) \
26 { \
27 break; /* rc == correct element */ \
28 } \
30 /* End of list check */ \
31 if( ( (rc) = (rc)->elm.tqe_next ) == (head)->tqh_first ) \
32 { \
33 rc = NULL; \
34 break; \
35 } \
36 } \
39 #endif /* __WINE_DPLAYX_QUEUE_H */