Clean up some headers.
Add epicsScanReal.c.
This commit is contained in:
@@ -134,6 +134,7 @@ SRCS += adjustment.c
|
||||
SRCS += cantProceed.c
|
||||
SRCS += epicsConvert.c
|
||||
SRCS += epicsExit.c
|
||||
SRCS += epicsScanReal.c
|
||||
SRCS += epicsString.c
|
||||
SRCS += epicsStrtod.c
|
||||
SRCS += truncateFile.c
|
||||
|
||||
41
src/libCom/misc/epicsScanReal.c
Normal file
41
src/libCom/misc/epicsScanReal.c
Normal file
@@ -0,0 +1,41 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* Copyright (c) 2002 The Regents of the University of California, as
|
||||
* Operator of Los Alamos National Laboratory.
|
||||
* EPICS BASE Versions 3.13.7
|
||||
* and higher are distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
/*epicsScanReal.c*/
|
||||
/*Author: Eric Norum */
|
||||
|
||||
#include <epicsStdlib.h>
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsStdio.h"
|
||||
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsStrScanDouble(const char *str, double *dest)
|
||||
{
|
||||
char *endp;
|
||||
double dtmp;
|
||||
|
||||
dtmp = epicsStrtod(str, &endp);
|
||||
if (endp == str)
|
||||
return 0;
|
||||
*dest = dtmp;
|
||||
return 1;
|
||||
}
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsStrScanFloat(const char *str, float *dest)
|
||||
{
|
||||
char *endp;
|
||||
double dtmp;
|
||||
|
||||
dtmp = epicsStrtod(str, &endp);
|
||||
if (endp == str)
|
||||
return 0;
|
||||
*dest = dtmp;
|
||||
return 1;
|
||||
}
|
||||
@@ -16,6 +16,9 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc int epicsShareAPI epicsStrScanDouble(const char *str, double *dest);
|
||||
epicsShareFunc int epicsShareAPI epicsStrScanFloat(const char *str, float *dest);
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <osdStrtod.h>
|
||||
|
||||
|
||||
@@ -10,14 +10,13 @@
|
||||
/*epicsStrtod.c*/
|
||||
/*Author: Eric Norum */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include "epicsString.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "epicsString.h"
|
||||
#include "epicsStdlib.h"
|
||||
|
||||
|
||||
epicsShareFunc double epicsShareAPI epicsStrtod(
|
||||
|
||||
Reference in New Issue
Block a user