12#define NULL ((void*) 0)
15#define _VALUE(list, offset) *((void**) ((char *)list + offset))
16#define VALUE(list, offset) (unsigned long) _VALUE(list, offset)
17#define NEXT(list) _VALUE(list, next)
18#define ITER(list) list = NEXT(list)
58 if (
i !=
l)
return l1;
73 if (addr == list)
return addr;
87 if (list == addr)
return nlist;
90 while (nlist !=
NULL && nlist != addr)
104 if (
VALUE(list, long_field) == what)
return list;
115 if (
VALUE(list, long_field) >= what)
117 if (
VALUE(list, long_field) == what)
return list;
129 unsigned long what =
VALUE(addr, long_field);
133 if (list == addr)
return nlist;
134 if (
VALUE(list, long_field) > what)
return list;
137 while (nlist !=
NULL && nlist != addr)
139 if (
VALUE(list, long_field) > what)
return olist;
150 unsigned long what =
VALUE(addr, long_field);
152 if (list ==
NULL || what <=
VALUE(list, long_field))
160 void* curr =
NEXT(list);
162 while (curr !=
NULL &&
VALUE(curr, long_field) < what)
227 if (prev !=
NULL &&
VALUE(prev, long_field) >
VALUE(list, long_field))
229 "%d > %d",
VALUE(prev, long_field),
VALUE(list, long_field));
243 if (prev !=
NULL &&
VALUE(prev, long_field) >
VALUE(l1, long_field))
245 "%d > %d",
VALUE(prev, long_field),
VALUE(l1, long_field));
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
#define omCheckReturnError(cond, error)
#define omCheckReturn(cond)
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
@ omError_SortedListError
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)
#define VALUE(list, offset)
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)