MCPcopy Create free account
hub / github.com/ZDoom/Raze / ScanChainForName

Function ScanChainForName

source/common/console/c_dispatch.cpp:396–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396static FConsoleCommand *ScanChainForName (FConsoleCommand *start, const char *name, size_t namelen, FConsoleCommand **prev)
397{
398 int comp;
399
400 *prev = NULL;
401 while (start)
402 {
403 comp = start->m_Name.CompareNoCase(name, namelen);
404 if (comp > 0)
405 return NULL;
406 else if (comp == 0 && start->m_Name[namelen] == 0)
407 return start;
408
409 *prev = start;
410 start = start->m_Next;
411 }
412 return NULL;
413}
414
415static FConsoleCommand *FindNameInHashTable (FConsoleCommand **table, const char *name, size_t namelen)
416{

Callers 4

FindNameInHashTableFunction · 0.85
AddToHashMethod · 0.85
C_SetAliasFunction · 0.85
CCMDFunction · 0.85

Calls 1

CompareNoCaseMethod · 0.80

Tested by

no test coverage detected