From e3c514ea9e3fe17148bc859de5dba21b373ca644 Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Mon, 1 Sep 2003 14:05:47 +0000 Subject: [PATCH] Add *all* iocsh variables, not just the first. A tip of the hat to Mark Rivers for fixing this. --- src/iocsh/iocsh.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/iocsh/iocsh.cpp b/src/iocsh/iocsh.cpp index 5b1aa0c73..8f3608cb8 100644 --- a/src/iocsh/iocsh.cpp +++ b/src/iocsh/iocsh.cpp @@ -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; } }