#include "omConfig.h"
#include "omalloc.h"
#include "omDebug.h"
Go to the source code of this file.
|
int | _omListLength (void *list, int next) |
|
void * | _omListLast (void *list, int next) |
|
void * | _omListHasCycle (void *list, int next) |
|
void * | _omIsOnList (void *list, int next, void *addr) |
|
void * | _omRemoveFromList (void *list, int next, void *addr) |
|
void * | _omFindInList (void *list, int next, int long_field, unsigned long what) |
|
void * | _omFindInSortedList (void *list, int next, int long_field, unsigned long what) |
|
void * | _omRemoveFromSortedList (void *list, int next, int long_field, void *addr) |
|
void * | _omInsertInSortedList (void *list, int next, int long_field, void *addr) |
|
omError_t | _omCheckList (void *list, int next, int level, omError_t report, OM_FLR_DECL) |
|
omError_t | _omCheckSortedList (void *list, int next, int long_field, int level, omError_t report, OM_FLR_DECL) |
|
§ _VALUE
#define _VALUE |
( |
|
list, |
|
|
|
offset |
|
) |
| *((void**) ((char *)list + offset)) |
§ ITER
#define ITER |
( |
|
list | ) |
list = NEXT(list) |
§ NEXT
§ NULL
§ VALUE
§ _omCheckList()
omError_t _omCheckList |
( |
void * |
list, |
|
|
int |
next, |
|
|
int |
level, |
|
|
omError_t |
report, |
|
|
OM_FLR_DECL |
|
|
) |
| |
Definition at line 176 of file omList.c.
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
#define omCheckReturn(cond)
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
§ _omCheckSortedList()
omError_t _omCheckSortedList |
( |
void * |
list, |
|
|
int |
next, |
|
|
int |
long_field, |
|
|
int |
level, |
|
|
omError_t |
report, |
|
|
OM_FLR_DECL |
|
|
) |
| |
Definition at line 214 of file omList.c.
225 if (prev !=
NULL &&
VALUE(prev, long_field) >
VALUE(list, long_field))
227 "%d > %d",
VALUE(prev, long_field),
VALUE(list, long_field));
241 if (prev !=
NULL &&
VALUE(prev, long_field) >
VALUE(l1, long_field))
243 "%d > %d",
VALUE(prev, long_field),
VALUE(l1, long_field));
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
#define omCheckReturnError(cond, error)
#define omCheckReturn(cond)
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
#define VALUE(list, offset)
§ _omFindInList()
void* _omFindInList |
( |
void * |
list, |
|
|
int |
next, |
|
|
int |
long_field, |
|
|
unsigned long |
what |
|
) |
| |
Definition at line 98 of file omList.c.
102 if (
VALUE(list, long_field) == what)
return list;
#define VALUE(list, offset)
§ _omFindInSortedList()
void* _omFindInSortedList |
( |
void * |
list, |
|
|
int |
next, |
|
|
int |
long_field, |
|
|
unsigned long |
what |
|
) |
| |
Definition at line 108 of file omList.c.
113 if (
VALUE(list, long_field) >= what)
115 if (
VALUE(list, long_field) == what)
return list;
#define VALUE(list, offset)
§ _omInsertInSortedList()
void* _omInsertInSortedList |
( |
void * |
list, |
|
|
int |
next, |
|
|
int |
long_field, |
|
|
void * |
addr |
|
) |
| |
Definition at line 146 of file omList.c.
148 unsigned long what =
VALUE(addr, long_field);
150 if (list ==
NULL || what <=
VALUE(list, long_field))
158 void* curr =
NEXT(list);
160 while (curr !=
NULL &&
VALUE(curr, long_field) < what)
#define VALUE(list, offset)
§ _omIsOnList()
void* _omIsOnList |
( |
void * |
list, |
|
|
int |
next, |
|
|
void * |
addr |
|
) |
| |
Definition at line 64 of file omList.c.
71 if (addr == list)
return addr;
§ _omListHasCycle()
void* _omListHasCycle |
( |
void * |
list, |
|
|
int |
next |
|
) |
| |
Definition at line 40 of file omList.c.
56 if (
i != l)
return l1;
§ _omListLast()
void* _omListLast |
( |
void * |
list, |
|
|
int |
next |
|
) |
| |
§ _omListLength()
int _omListLength |
( |
void * |
list, |
|
|
int |
next |
|
) |
| |
§ _omRemoveFromList()
void* _omRemoveFromList |
( |
void * |
list, |
|
|
int |
next, |
|
|
void * |
addr |
|
) |
| |
Definition at line 77 of file omList.c.
85 if (list == addr)
return nlist;
88 while (nlist !=
NULL && nlist != addr)
§ _omRemoveFromSortedList()
void* _omRemoveFromSortedList |
( |
void * |
list, |
|
|
int |
next, |
|
|
int |
long_field, |
|
|
void * |
addr |
|
) |
| |
Definition at line 123 of file omList.c.
127 unsigned long what =
VALUE(addr, long_field);
131 if (list == addr)
return nlist;
132 if (
VALUE(list, long_field) > what)
return list;
135 while (nlist !=
NULL && nlist != addr)
137 if (
VALUE(list, long_field) > what)
return olist;
#define VALUE(list, offset)