Use epicsScanFloat/epicsScanDouble rather than sscanf.

This allows proper handling of Nan/Inf on all architectures.
This commit is contained in:
W. Eric Norum
2004-10-12 17:45:31 +00:00
parent 25c797b212
commit 0dc034962c
18 changed files with 53 additions and 52 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
/*************************************************************************\
epicsS*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
@@ -16,7 +16,7 @@
#define AIT_CONVERT_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <epicsStdlib.h>
#include <limits.h>
#include "epicsStdio.h"
#define epicsExportSharedSymbols
@@ -52,7 +52,7 @@ bool getStringAsDouble ( const char * pString,
ftmp = itmp;
}
else {
int j = sscanf ( pString,"%lf", &ftmp );
int j = epicsScanDouble( pString, &ftmp );
if ( j != 1 ) {
j = sscanf ( pString,"%x", &itmp );
if ( j == 1 ) {