Commit Graph
15 Commits
Author SHA1 Message Date
Andrew Johnson b9f0ef5158 Merge 3.14 version and add 3.15 edits 2016-05-22 14:38:18 +02:00
Andrew Johnson 2ab2470317 Fix epicsStrtod() implementation to detect overflow
The VxWorks version of strtod() that we use returns Inf
instead of setting errno on overflow.
2014-11-07 13:25:16 -06:00
Andrew Johnson 97e445f78d Merged epicsInt64-library-support branch 2014-10-06 20:28:35 -05:00
Andrew Johnson 7a9407d7ab libCom: Clean up MS compiler warnings.
This doesn't fix the Microsoft link failure though, that may
need an upgrade of MS Visual Studio on our Hudson Windows VM.
2014-09-04 11:07:59 -05:00
Andrew Johnson b0cdaddebc Added 64bit and long long epicsParse* functions 2014-08-27 22:21:30 -07:00
Andrew Johnson 78a4e462d5 libCom: Recognize hex literals in epicsStrtod()
Allows Windows and VxWorks to accept hex integers as a double.
2013-12-02 11:12:19 -06:00
Andrew Johnson da9982f875 libCom: Fix unsigned overflow limits in epicsParse*
The strtoul() routine accepts negative numbers.  This fix
ensures we handle them properly, and adds suitable tests.

Also fix the test for 1e300, in case the compiler gives a
slightly different literal constant than strtod() returns.
2012-06-30 15:34:29 -05:00
Andrew Johnson fb61234431 Change the epicsParse APIs to return a units pointer.
This lets us use epicsParseDouble() for scan rate parsing.

Ensure the scanOnce thread is a higher priority than the fastest
periodic scan thread, irrespective of how many threads there are.
2012-06-29 14:41:35 -05:00
Andrew Johnson 269fb01c63 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.
2012-06-22 14:06:52 -05:00
Andrew Johnson 31d149d8d9 Fixed 64 bit compiler warnings from Tom Palaia/MacOS. 2009-04-23 18:49:40 +00:00
Andrew Johnson 52ab7f6d6b A char with the top bit set doesn't cast properly when its signed. 2007-09-11 19:11:55 +00:00
Andrew Johnson 5a561ca613 Make epicsStrtod() parse the full "Infinity" and not stop after "Inf". 2006-10-26 21:18:05 +00:00
Andrew Johnson 7aa6a2ca98 Better fix to the epicsStrtod problem: Don't compile our function if epicsStrtod
is a macro; that way you can't set a breakpoint on it which would never fire.
2006-01-05 21:08:02 +00:00
W. Eric Norum 8d3dc9eb33 Avoid infinite recursion on systems with 'working' strtod() functions. 2005-12-26 18:32:43 +00:00
Marty Kraimer 3499fbe51d get rid of epicsShareAPI; epicsStrtok_r is new; clean up epicsStdlib 2005-12-12 19:54:48 +00:00