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

View File

@@ -12,7 +12,7 @@
/*The routines in this module are serially reusable NOT reentrant*/
#include <stdlib.h>
#include <epicsStdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
@@ -847,7 +847,7 @@ static void dbBreakBody(void)
praw = (char *)popFirstTemp();
peng = (char *)popFirstTemp();
if((sscanf(praw,"%lf",&raw)!=1) || (sscanf(peng,"%lf",&eng)!=1) ) {
if((epicsScanDouble(praw, &raw)!=1) || (sscanf(peng,"%lf",&eng)!=1) ) {
yyerrorAbort("dbbrkTable: Illegal table value");
}
free((void *)praw);