libCom: Add routines for parsing strings into epicsTypes

Adds new routines for converting numeric strings into the
standard epicsInt8, epicsUInt8, epicsInt16, epicsUInt16,
epicsInt32 and epicsUInt32 types, along with Long, ULong,
Double and Float.  These all provide error checking and
detection of extraneous characters.  The epicsScanDouble
and epicsScanFloat routines originally in epicsStdlib.h
are replaced by macros that call the epicsParse routine,
and this also provides epicsScanLong and epicsScanULong
to match.

A test file is added to ensure conversions work properly
and report appropriate errors.  This file also checks the
native strtod() routine if not used to check whether the
epicsStrtod() code is required on this platform.
This commit is contained in:
Andrew Johnson
2012-06-22 14:06:52 -05:00
parent 7cae5ebd7b
commit 269fb01c63
7 changed files with 722 additions and 27 deletions
+1
View File
@@ -23,6 +23,7 @@ Com_SRCS += errSymTbl.c
#
ERR_S_FILES += $(LIBCOM)/osi/devLib.h
ERR_S_FILES += $(LIBCOM)/as/asLib.h
ERR_S_FILES += $(LIBCOM)/misc/epicsStdlib.h
ERR_S_FILES += $(SRC)/ioc/db/dbAccessDefs.h
ERR_S_FILES += $(SRC)/ioc/dbStatic/devSup.h
ERR_S_FILES += $(SRC)/ioc/dbStatic/drvSup.h