Add *all* iocsh variables, not just the first.

A tip of the hat to Mark Rivers for fixing this.
This commit is contained in:
W. Eric Norum
2003-09-01 14:05:47 +00:00
parent fd33cf444e
commit e3c514ea9e
+3 -2
View File
@@ -163,6 +163,7 @@ void epicsShareAPI iocshRegisterVariable (const iocshVarDef *piocshVarDef)
l->next = n;
}
n->pVarDef = piocshVarDef;
piocshVarDef++;
}
iocshTableUnlock ();
}
@@ -563,10 +564,10 @@ static void varHandler(const iocshVarDef *v, const char *setString)
switch(v->type) {
default: break;
case iocshArgInt:
printf("%12s = %d\n", v->name, *(int *)v->pval);
printf("%s = %d\n", v->name, *(int *)v->pval);
break;
case iocshArgDouble:
printf("%12s = %g\n", v->name, *(double *)v->pval);
printf("%s = %g\n", v->name, *(double *)v->pval);
break;
}
}