From e3f3d9c87b82f1bdc36a76aaceeab9c628ac3b15 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Mon, 13 Feb 1995 15:08:18 +0000 Subject: [PATCH] Remove special code for DBR_STRING to allow numeric index (dbLink now does this) --- src/db/dbTest.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/db/dbTest.c b/src/db/dbTest.c index 9088c4af9..2658469a8 100644 --- a/src/db/dbTest.c +++ b/src/db/dbTest.c @@ -389,21 +389,8 @@ long dbpf(char *pname,char *pvalue) errMessage(status,"dbNameToAddr error"); return(1); } - /* For enumerated types must allow for ENUM rather than string*/ - /* If entire field is digits then use DBR_ENUM else DBR_STRING*/ - if((addr.dbr_field_type==DBR_ENUM) && (*pvalue!=0) - && (strspn(pvalue,"0123456789")==strlen(pvalue))) { - short value; - - sscanf(pvalue,"%hu",&value); - status=dbPutField(&addr,DBR_ENUM,&value,1L); - } else { - status=dbPutField(&addr,DBR_STRING,pvalue,1L); - } - if(status) { - errMessage(status,"dbPutField error"); - return(1); - } + status=dbPutField(&addr,DBR_STRING,pvalue,1L); + if(status) return(1); status=dbgf(pname); return(status); }