allow glob pattern in var command

Conflicts:
	documentation/RELEASE_NOTES.md
This commit is contained in:
2021-04-16 09:30:31 +02:00
parent 718390cfba
commit 9926fe3036
2 changed files with 15 additions and 0 deletions
+5
View File
@@ -17,6 +17,11 @@ should also be read to understand what has changed since earlier releases.
<!-- Insert new items immediately below here ... -->
### Glob pattern allowed in `var` command
When used with one argument, the `var` command can be used with a glob pattern
for printing matching variables.
### Fix for input links marked "special"
The calcout record (and a number of synApps record types) marks its input
+10
View File
@@ -1130,6 +1130,16 @@ static void varCallFunc(const iocshArgBuf *args)
for (v = iocshVariableHead ; v != NULL ; v = v->next)
varHandler(v->pVarDef, args[1].sval);
}
else if(args[1].sval == NULL) {
int found = 0;
for (v = iocshVariableHead ; v != NULL ; v = v->next)
if (epicsStrGlobMatch(v->pVarDef->name, args[0].sval) != 0) {
varHandler(v->pVarDef, NULL);
found = 1;
}
if (!found)
fprintf(epicsGetStderr(), "No var matching %s found.\n", args[0].sval);
}
else {
v = (iocshVariable *)registryFind(iocshVarID, args[0].sval);
if (v == NULL) {