Hi Eric,
On Jun 5, 2012, at 6:11 AM, Dirk Zimoch wrote:
>
> I think adding something like this to epicsStrtod should fix the problem:
>
> if (epicsStrnCaseCmp("0x", cp, 2) == 0) {
> return (double)strtoul(str, endp, 16);
> }
I'll be using strtol() instead in the 3.15 code, so -0x1 works.
On 2012-06-05 Eric Norum wrote:
> The code with that change doesn't completely match the semantics of strtod
> as presented in the C99 standard, but it's certainly better than the
> current code.
What else are we missing? I don't have the C99 standard to look at here.
> BTW -- does vxWorks still not supply a working strtod? I
> think that it is the only system that doesn't just define epicsStrtod as
> strtod.
The wording in the vxWorks 6.8 manpage is exactly the same as Dirk posted from
vxWorks 5.5.
No, we use our version of epicsStrtod() on Windows, Cygwin, vxWorks and
Solaris. I have a branch for 3.15 where I've been working on the numeric
conversions, I'll add some tests for the native strtod().
- Andrew
--
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte
- Replies:
- Re: mask for bitwise operation in CALC record Eric Norum
- References:
- mask for bitwise operation in CALC record haquin
- Re: mask for bitwise operation in CALC record Dirk Zimoch
- Re: mask for bitwise operation in CALC record Eric Norum
- Navigate by Date:
- Prev:
Re: mask for bitwise operation in CALC record Eric Norum
- Next:
Re: mask for bitwise operation in CALC record Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: mask for bitwise operation in CALC record Eric Norum
- Next:
Re: mask for bitwise operation in CALC record Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|