Clean up some headers.

Add epicsScanReal.c.
This commit is contained in:
W. Eric Norum
2004-10-12 13:51:52 +00:00
parent 331979dfb9
commit 86152e91b9
4 changed files with 48 additions and 4 deletions

View File

@@ -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

View 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;
}

View File

@@ -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>

View File

@@ -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(