Source
258
258
*value = NULL;
259
259
return -1;
260
260
}
261
261
262
262
int drmSLLookupNeighbors(void *l, unsigned long key,
263
263
unsigned long *prev_key, void **prev_value,
264
264
unsigned long *next_key, void **next_value)
265
265
{
266
266
SkipListPtr list = (SkipListPtr)l;
267
267
SLEntryPtr update[SL_MAX_LEVEL + 1];
268
-
SLEntryPtr entry;
269
268
int retcode = 0;
270
269
271
-
entry = SLLocate(list, key, update);
272
-
273
270
*prev_key = *next_key = key;
274
271
*prev_value = *next_value = NULL;
275
272
276
273
if (update[0]) {
277
274
*prev_key = update[0]->key;
278
275
*prev_value = update[0]->value;
279
276
++retcode;
280
277
if (update[0]->forward[0]) {
281
278
*next_key = update[0]->forward[0]->key;
282
279
*next_value = update[0]->forward[0]->value;