- introduced ForEachCommand function
This commit is contained in:
16
SCinter.c
16
SCinter.c
@@ -1109,3 +1109,19 @@ char *FindAliases(SicsInterp *pSics, char *name)
|
||||
DeleteDynString(result);
|
||||
return charResult;
|
||||
}
|
||||
/*---------------------------------------------------------------------*/
|
||||
void ForEachCommand(int (*scanFunction)(char *name, pDummy object, void *userData)
|
||||
, void *userData)
|
||||
{
|
||||
CommandList *pCurrent;
|
||||
|
||||
|
||||
for(pCurrent = pServ->pSics->pCList;
|
||||
pCurrent != NULL;
|
||||
pCurrent = pCurrent->pNext)
|
||||
{
|
||||
if(scanFunction(pCurrent->pName, pCurrent->pData, userData) == 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user