Don't require pdbbase if not linking iocshRegisterCommon commands.

This commit is contained in:
W. Eric Norum
2004-11-03 17:14:48 +00:00
parent 25c30be105
commit c7e7f8e221
3 changed files with 15 additions and 1 deletions
+10 -1
View File
@@ -35,6 +35,11 @@
extern "C" {
/*
* Global link to pdbbase
*/
epicsShareDef struct dbBase **iocshPpdbbase;
/*
* File-local information
*/
@@ -273,7 +278,11 @@ cvtArg (const char *filename, int lineno, char *arg, iocshArgBuf *argBuf, const
case iocshArgPdbbase:
/* Argument must be missing or 0 or pdbbase */
if(!arg || !*arg || (*arg == '0') || (strcmp(arg, "pdbbase") == 0)) {
argBuf->vval = pdbbase;
if(!iocshPpdbbase || !*iocshPpdbbase) {
showError (filename, lineno, "pdbbase not present");
return 0;
}
argBuf->vval = *iocshPpdbbase;
break;
}
showError (filename, lineno, "Expecting `pdbbase' got `%s'", arg);
+3
View File
@@ -70,6 +70,9 @@ epicsShareFunc void epicsShareAPI iocshFree(void);
epicsShareFunc int epicsShareAPI iocsh(const char *pathname);
/* 'weak' link to pdbbase */
epicsShareExtern struct dbBase **iocshPpdbbase;
#ifdef __cplusplus
}
#endif
+2
View File
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <dbAccess.h>
#define epicsExportSharedSymbols
#include "iocCoreLimitsRegister.h"
@@ -34,6 +35,7 @@
void epicsShareAPI iocshRegisterCommon(void)
{
iocshPpdbbase = &pdbbase;
iocCoreLimitsRegister();
osiRegister();
iocUtilRegister();