Changed function outputs to remove pointer to next function.
This commit is contained in:
1 parent
45ed461665
commit
15cb72acbc
2 files changed
+18
-14
No files matched your search
@@ -41,8 +41,17 @@ epicsShareDef struct dbBase **iocshPpdbbase;
|
||||
/*
|
||||
* File-local information
|
||||
*/
|
||||
struct iocshCommand {
|
||||
iocshFuncDef const *pFuncDef;
|
||||
iocshCallFunc func;
|
||||
struct iocshCommand *next;
|
||||
};
|
||||
static struct iocshCommand *iocshCommandHead;
|
||||
static char iocshCmdID[] = "iocshCmd";
|
||||
struct iocshVariable {
|
||||
iocshVarDef const *pVarDef;
|
||||
struct iocshVariable *next;
|
||||
};
|
||||
static struct iocshVariable *iocshVariableHead;
|
||||
static char iocshVarID[] = "iocshVar";
|
||||
extern "C" { static void varCallFunc(const iocshArgBuf *); }
|
||||
@@ -141,9 +150,9 @@ void epicsShareAPI iocshRegister (const iocshFuncDef *piocshFuncDef,
|
||||
/*
|
||||
* Retrieves a previously registered function with the given name.
|
||||
*/
|
||||
struct iocshCommand * epicsShareAPI iocshFind(const char *name)
|
||||
const iocshCmdDef * epicsShareAPI iocshFind(const char *name)
|
||||
{
|
||||
return (iocshCommand *) registryFind(iocshCmdID, name);
|
||||
return (iocshCmdDef *) registryFind(iocshCmdID, name);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -207,9 +216,10 @@ void epicsShareAPI iocshRegisterVariable (const iocshVarDef *piocshVarDef)
|
||||
/*
|
||||
* Retrieves a previously registered variable with the given name.
|
||||
*/
|
||||
struct iocshVariable * epicsShareAPI iocshFindVariable(const char *name)
|
||||
const iocshVarDef * epicsShareAPI iocshFindVariable(const char *name)
|
||||
{
|
||||
return (iocshVariable *) registryFind(iocshVarID, name);
|
||||
struct iocshVariable *temp = (iocshVariable *) registryFind(iocshVarID, name);
|
||||
return temp->pVarDef;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -59,24 +59,18 @@ typedef struct iocshFuncDef {
|
||||
|
||||
typedef void (*iocshCallFunc)(const iocshArgBuf *argBuf);
|
||||
|
||||
struct iocshCommand {
|
||||
typedef struct iocshCmdDef {
|
||||
iocshFuncDef const *pFuncDef;
|
||||
iocshCallFunc func;
|
||||
struct iocshCommand *next;
|
||||
};
|
||||
|
||||
struct iocshVariable {
|
||||
iocshVarDef const *pVarDef;
|
||||
struct iocshVariable *next;
|
||||
};
|
||||
}iocshCmdDef;
|
||||
|
||||
epicsShareFunc void epicsShareAPI iocshRegister(
|
||||
const iocshFuncDef *piocshFuncDef, iocshCallFunc func);
|
||||
epicsShareFunc void epicsShareAPI iocshRegisterVariable (
|
||||
const iocshVarDef *piocshVarDef);
|
||||
epicsShareFunc struct iocshCommand* epicsShareAPI iocshFind(
|
||||
epicsShareFunc const iocshCmdDef * epicsShareAPI iocshFind(
|
||||
const char* name);
|
||||
epicsShareFunc struct iocshVariable* epicsShareAPI iocshFindVariable(
|
||||
epicsShareFunc const iocshVarDef * epicsShareAPI iocshFindVariable(
|
||||
const char* name);
|
||||
|
||||
/* iocshFree frees storage used by iocshRegister*/
|
||||
|
||||
Reference in new issue
Block a user