11#define OM_LIST_OFFSET(ptr, name_of_offset_field) \
12 (ptr != NULL ? ((char*) &(ptr->name_of_offset_field)) - ((char*) ptr) : 0)
62#define omListLength(ptr) \
64#define omListLast(ptr) \
66#define omListHasCycle(ptr) \
67 _omListHasCycle(ptr, 0)
68#define omIsOnList(ptr, addr) \
69 _omIsOnList(ptr, 0, addr)
70#define omRemoveFromList(ptr, addr) \
71 _omRemoveFromList(ptr, 0, addr)
72#define omFindInList(ptr, what, value) \
73 _omFindInList(ptr, 0, OM_LIST_OFFSET(ptr, what), (unsigned long) value)
74#define omInsertInSortedList(ptr, what, addr) \
75 _omInsertInSortedList(ptr, 0, OM_LIST_OFFSET(ptr, what), addr)
76#define omFindInSortedList(ptr, what, value) \
77 _omFindInSortedList(ptr, 0, OM_LIST_OFFSET(ptr, what), value)
78#define omRemoveFromSortedList(ptr, what, addr) \
79 _omRemoveFromSortedList(ptr, 0, OM_LIST_OFFSET(ptr, what), addr)
81#define omTestList(ptr, level) \
82 _omCheckList(ptr, 0, level, omError_NoError, OM_FLR)
83#define omCheckList(ptr, level, report, OM_FLR_VAL) \
84 _omCheckList(ptr, 0, level, report, OM_FLR_VAL)
85#define omCheckSortedList(ptr, what, level, report, OM_FLR_VAL) \
86 _omCheckSortedList(ptr, 0, OM_LIST_OFFSET(ptr, what), level, report, OM_FLR_VAL)
94#define omGListLength(ptr, next) \
95 _omListLength(ptr, OM_LIST_OFFSET(ptr, next))
96#define omGListLast(ptr, next) \
97 _omListLast(ptr, OM_LIST_OFFSET(ptr, next))
98#define omGListHasCycle(ptr, next) \
99 _omListHasCycle(ptr, OM_LIST_OFFSET(ptr, next))
100#define omIsOnGList(ptr, next, addr) \
101 _omIsOnList(ptr, OM_LIST_OFFSET(ptr, next), addr)
102#define omRemoveFromGList(ptr, next, addr) \
103 _omRemoveFromList(ptr, OM_LIST_OFFSET(ptr, next), addr)
104#define omFindInGList(ptr, next, what, value) \
105 _omFindInList(ptr, OM_LIST_OFFSET(ptr, next), OM_LIST_OFFSET(ptr, what), (unsigned long) value)
106#define omInsertInSortedGList(ptr, next, what, addr) \
107 _omInsertInSortedList(ptr, OM_LIST_OFFSET(ptr, next), OM_LIST_OFFSET(ptr, what), addr)
108#define omFindInSortedGList(ptr, next, what, value) \
109 _omFindInSortedList(ptr, OM_LIST_OFFSET(ptr, next),OM_LIST_OFFSET(ptr,what),value)
110#define omRemoveFromSortedGList(ptr, next, what, addr) \
111 _omRemoveFromSortedList(ptr, OM_LIST_OFFSET(addr,next),OM_LIST_OFFSET(addr,what),addr)
113#define omTestGList(ptr, next, level) \
114 omCheckGList(ptr, next, level, omError_NoError, OM_FLR)
115#define omCheckGList(ptr, next, level, report, OM_FLR_VAL) \
116 _omCheckList(ptr, OM_LIST_OFFSET(ptr,next), level, report, OM_FLR_VAL)
117#define omCheckSortedGList(ptr, next, what, level, report, OM_FLR_VAL) \
118 _omCheckSortedList(ptr, OM_LIST_OFFSET(ptr,next), OM_LIST_OFFSET(ptr,what), level, report, OM_FLR_VAL)
120#define omTestGList(ptr, next, val) (omError_NoError)
void * _omIsOnList(void *list, int next, void *addr)
void * _omRemoveFromList(void *list, int next, void *addr)
void * _omListLast(void *list, int next)
void * _omInsertInSortedList(void *list, int next, int long_field, void *addr)
void * _omListHasCycle(void *list, int next)
omError_t _omCheckSortedList(void *list, int next, int long_field, int level, omError_t report, OM_FLR_DECL)
void * _omFindInSortedList(void *list, int next, int long_field, unsigned long what)
void * _omFindInList(void *list, int next, int long_field, unsigned long what)
int _omListLength(void *list, int next)
omError_t _omCheckList(void *list, int next, int level, omError_t report, OM_FLR_DECL)
void * _omRemoveFromSortedList(void *list, int next, int long_field, void *addr)