diff --git a/src/dbStatic/dbPvdLib.c b/src/dbStatic/dbPvdLib.c index 22665cdb2..8aec8aaf4 100644 --- a/src/dbStatic/dbPvdLib.c +++ b/src/dbStatic/dbPvdLib.c @@ -155,7 +155,7 @@ PVDENTRY *dbPvdAdd(dbBase *pdbbase,dbRecordType *precordType,dbRecordNode *precn ppvdlist=ppvd[hashInd]; ppvdNode = (PVDENTRY *) ellFirst(ppvdlist); while(ppvdNode) { - if(strcmp(name,(char *)ppvdNode->precnode->precord) == 0) return(NULL); + if(strcmp(name,(char *)ppvdNode->precnode->recordname)==0) return(NULL); ppvdNode = (PVDENTRY *) ellNext((ELLNODE*)ppvdNode); } ppvdNode = dbCalloc(1, sizeof(PVDENTRY)); @@ -180,8 +180,8 @@ void dbPvdDelete(dbBase *pdbbase,dbRecordNode *precnode) ppvdlist=ppvd[hashInd]; ppvdNode = (PVDENTRY *) ellFirst(ppvdlist); while(ppvdNode) { - if(ppvdNode->precnode && ppvdNode->precnode->precord - && strcmp(name,(char *)ppvdNode->precnode->precord) == 0) { + if(ppvdNode->precnode && ppvdNode->precnode->recordname + && strcmp(name,(char *)ppvdNode->precnode->recordname) == 0) { ellDelete(ppvdlist, (ELLNODE*)ppvdNode); free((void *)ppvdNode); return; @@ -213,6 +213,7 @@ void dbPvdFreeMem(dbBase *pdbbase) free((void *)ppvd[hashInd]); } free((void *)ppvd); + pdbbase->ppvd = NULL; } void dbPvdDump(dbBase *pdbbase,int verbose) diff --git a/src/dbStatic/dbStaticLib.c b/src/dbStatic/dbStaticLib.c index 509b9a28c..b0a410592 100644 --- a/src/dbStatic/dbStaticLib.c +++ b/src/dbStatic/dbStaticLib.c @@ -1957,6 +1957,10 @@ char *dbVerify(DBENTRY *pdbentry,char *pstring) unsigned long value; char *endp; + if(strchr(pstring,'-')) { + strcpy(message,"not an unsigned number"); + return(message); + } value = strtoul(pstring,&endp,0); if(*endp!=0) { strcpy(message,"not an integer number"); @@ -2048,12 +2052,12 @@ char *dbGetRange(DBENTRY *pdbentry) if(!pflddes) {strcpy(message,"fldDes not found"); return(message);} switch (pflddes->field_type) { case DBF_STRING: {strcpy(message,"string"); return(message);} - case DBF_CHAR : {strcpy(message,"-128<->127"); return(message);} - case DBF_SHORT : {strcpy(message,"-32768<->32767");return(message);} - case DBF_LONG: {strcpy(message,"integer"); return(message);} - case DBF_UCHAR: {strcpy(message,"0<->255");return(message);} - case DBF_USHORT:{strcpy(message,"0<->65535");return(message);} - case DBF_ULONG:{strcpy(message,"unsigned integer");return(message);} + case DBF_CHAR : {strcpy(message,"-128 to 127"); return(message);} + case DBF_SHORT : {strcpy(message,"-32768 to 32767");return(message);} + case DBF_LONG: {strcpy(message,"long"); return(message);} + case DBF_UCHAR: {strcpy(message,"0 to 255");return(message);} + case DBF_USHORT:{strcpy(message,"0 to 65535");return(message);} + case DBF_ULONG:{strcpy(message,"unsigned long");return(message);} case DBF_ENUM: return(NULL); case DBF_FLOAT: case DBF_DOUBLE: {strcpy(message,"float");return(message);} diff --git a/src/dbStatic/dbStaticLib.h b/src/dbStatic/dbStaticLib.h index 36cb8bceb..34aaa83b8 100644 --- a/src/dbStatic/dbStaticLib.h +++ b/src/dbStatic/dbStaticLib.h @@ -206,4 +206,5 @@ extern int dbStaticDebug; #define S_dbLib_nameLength (M_dbLib|17) /*Record Name is too long*/ #define S_dbLib_noRecSup (M_dbLib|19) /*Record support not found*/ #define S_dbLib_strLen (M_dbLib|21) /*String is too long*/ +#define S_dbLib_noSizeOffset (M_dbLib|23) /*Missing SizeOffset Routine*/ #endif /*INCdbStaticLibh*/ diff --git a/src/dbStatic/dbStaticRun.c b/src/dbStatic/dbStaticRun.c index 42a465d81..20f27d167 100644 --- a/src/dbStatic/dbStaticRun.c +++ b/src/dbStatic/dbStaticRun.c @@ -35,9 +35,6 @@ of this distribution. #include #include #include -#include -#include -#include #include static char hex_digit_to_ascii[16]={'0','1','2','3','4','5','6','7','8','9', @@ -603,7 +600,7 @@ void dbGetRecordtypeSizeOffset(dbRecordType *pdbRecordType) vxstatus = symFindByName(sysSymTbl, name, (void *)&sizeOffset, &type); if (vxstatus != OK) { - status = S_rec_noSizeOffset; + status = S_dbLib_noSizeOffset; errPrintf(status,__FILE__,__LINE__,"%s",name); taskSuspend(0); }