#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
◆ ITER
◆ NEXT
◆ NULL
◆ VALUE
◆ _omCheckList()
Definition at line 178 of file omList.c.
179{
181
183 {
185 {
188 }
189 }
190 else
191 {
195
198 {
203 {
206 }
211 }
212 }
214}
omError_t omCheckPtr(const void *ptr, omError_t report, OM_FLR_DECL)
#define omCheckReturn(cond)
omError_t omReportError(omError_t error, omError_t report_error, OM_FLR_DECL, const char *fmt,...)
◆ _omCheckSortedList()
Definition at line 216 of file omList.c.
217{
219
221
223 {
225 {
230 prev = list;
232 }
233 }
234 else
235 {
239
241 {
249 {
252 }
257 }
258 }
260}
#define omCheckReturnError(cond, error)
@ omError_SortedListError
#define VALUE(list, offset)
◆ _omFindInList()
◆ _omFindInSortedList()
Definition at line 110 of file omList.c.
112{
114 {
116 {
119 }
121 }
123}
◆ _omInsertInSortedList()
Definition at line 148 of file omList.c.
149{
151
153 {
155 return addr;
156 }
157 else
158 {
159 void* prev = list;
160 void* curr =
NEXT(list);
161
163 {
164 prev = curr;
166 }
169 return list;
170 }
171}
◆ _omIsOnList()
Definition at line 66 of file omList.c.
67{
70
72 {
73 if (addr == list) return addr;
75 }
76 return 0;
77}
◆ _omListHasCycle()
Definition at line 42 of file omList.c.
43{
46
48
50 {
54 {
57 }
58 if (
i !=
l)
return l1;
61 }
63}
◆ _omListLast()
Definition at line 32 of file omList.c.
33{
35
37
38 return list;
39}
◆ _omListLength()
◆ _omRemoveFromList()
Definition at line 79 of file omList.c.
80{
81 void* nlist;
83
85
87 if (list == addr) return nlist;
88
90 while (nlist !=
NULL && nlist != addr)
91 {
92 list = nlist;
94 }
95
98}
◆ _omRemoveFromSortedList()
Definition at line 125 of file omList.c.
126{
127 void* nlist;
130
133 if (list == addr) return nlist;
135
137 while (nlist !=
NULL && nlist != addr)
138 {
140 list = nlist;
142 }
143
146}