equal
deleted
inserted
replaced
1 /* Copyright (c) 2009 The Khronos Group Inc. |
1 /* Copyright (c) 2009 The Khronos Group Inc. |
|
2 * Portions copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies) |
2 * |
3 * |
3 * Permission is hereby granted, free of charge, to any person obtaining a |
4 * Permission is hereby granted, free of charge, to any person obtaining a |
4 * copy of this software and/or associated documentation files (the |
5 * copy of this software and/or associated documentation files (the |
5 * "Materials"), to deal in the Materials without restriction, including |
6 * "Materials"), to deal in the Materials without restriction, including |
6 * without limitation the rights to use, copy, modify, merge, publish, |
7 * without limitation the rights to use, copy, modify, merge, publish, |
163 root = next; |
164 root = next; |
164 } |
165 } |
165 return root; |
166 return root; |
166 } |
167 } |
167 |
168 |
168 OWF_API_CALL void |
|
169 OWF_List_ForEach(OWF_NODE* root, NODEITERFUNC func, void* data) |
|
170 { |
|
171 while (root) { |
|
172 if (!func(root->data, data)) { |
|
173 return; |
|
174 } |
|
175 root = root->next; |
|
176 } |
|
177 } |
|
178 |
|
179 OWF_API_CALL OWF_NODE* |
|
180 OWF_List_Find(OWF_NODE* root, NODECMPFUNC func, void* data) |
|
181 { |
|
182 while (root) { |
|
183 if (func(root->data, data)) { |
|
184 break; |
|
185 } |
|
186 root = root->next; |
|
187 } |
|
188 return root; |
|
189 } |
|
190 |
|
191 |
|
192 #ifdef __cplusplus |
169 #ifdef __cplusplus |
193 } |
170 } |
194 #endif |
171 #endif |