Hi Gongfa,
Ok, lets try moving those definitions to file scope since that's where
all the others are found. As before, the following patch is against the
original R3.14.9 file:
Index: iocsh.cpp
===================================================================
RCS file:
/net/phoebus/epicsmgr/cvsroot/epics/base/src/iocsh/Attic/iocsh.cpp,v
retrieving revision 1.9.2.35
diff -u -b -r1.9.2.35 iocsh.cpp
--- iocsh.cpp 12 Dec 2006 21:04:19 -0000 1.9.2.35
+++ iocsh.cpp 20 Nov 2007 23:28:31 -0000
@@ -142,15 +142,16 @@
/*
* Register variable(s)
*/
+static const iocshArg varCmdArg0 = { "[variable",iocshArgString};
+static const iocshArg varCmdArg1 = { "[value]]",iocshArgString};
+static const iocshArg *varCmdArgs[2] = {&varCmdArg0, &varCmdArg1};
+static const iocshFuncDef varFuncDef = {"var",2,varCmdArgs};
+
void epicsShareAPI iocshRegisterVariable (const iocshVarDef *piocshVarDef)
{
struct iocshVariable *l, *p, *n;
int i;
int found;
- static const iocshArg varArg0 = { "[variable",iocshArgString};
- static const iocshArg varArg1 = { "[value]]",iocshArgString};
- static const iocshArg *varArgs[2] = {&varArg0, &varArg1};
- static const iocshFuncDef varFuncDef = {"var",2,varArgs};
iocshTableLock ();
while ((piocshVarDef != NULL)
Along with most of the rest of the US population, I will be on vacation
for the remainder of this week.
- Andrew