MCPcopy Index your code
hub / github.com/MapServer/MapServer / msNextKeyFromHashTable

Function msNextKeyFromHashTable

maphash.c:229–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229const char *msNextKeyFromHashTable( hashTableObj *table, const char *lastKey )
230{
231 int hash_index;
232 struct hashObj *link;
233
234 if (!table) {
235 msSetError(MS_HASHERR, "No hash table", "msNextKeyFromHashTable");
236 return NULL;
237 }
238
239 if ( lastKey == NULL )
240 return msFirstKeyFromHashTable( table );
241
242 hash_index = hash(lastKey);
243 for ( link = table->items[hash_index];
244 link != NULL && strcasecmp(lastKey,link->key) != 0;
245 link = link->next ) {}
246
247 if ( link != NULL && link->next != NULL )
248 return link->next->key;
249
250 while ( ++hash_index < MS_HASHSIZE ) {
251 if ( table->items[hash_index] != NULL )
252 return table->items[hash_index]->key;
253 }
254
255 return NULL;
256}
257

Callers 9

msSLDParseNamedLayerFunction · 0.85
msBuildURLFromWMSParamsFunction · 0.85
msPrepareWMSLayerRequestFunction · 0.85
msCopyHashTableFunction · 0.85
layerSubstituteStringFunction · 0.85
msApplyMapConfigOptionsFunction · 0.85
hashTableObj_nextKeyFunction · 0.85

Calls 4

msSetErrorFunction · 0.85
msFirstKeyFromHashTableFunction · 0.85
hashFunction · 0.85
strcasecmpFunction · 0.85

Tested by

no test coverage detected