ack/lang/cem/libcc/gen/strtod.c

30 lines
378 B
C
Raw Normal View History

1988-08-11 12:49:06 +00:00
/* $Header$ */
#ifndef NOFLOAT
1989-07-26 11:08:24 +00:00
struct mantissa {
unsigned long h_32;
unsigned long l_32;
};
1988-08-11 12:49:06 +00:00
1989-07-26 11:08:24 +00:00
struct EXTEND {
short sign;
short exp;
struct mantissa mantissa;
#define m1 mantissa.h_32
#define m2 mantissa.l_32
};
extern double _ext_dbl_cvt();
1988-08-11 12:49:06 +00:00
double
strtod(p, pp)
1989-07-26 11:08:24 +00:00
char *p, **pp;
1988-08-11 12:49:06 +00:00
{
1989-07-26 11:08:24 +00:00
struct EXTEND e;
1988-08-11 12:49:06 +00:00
1989-07-26 11:08:24 +00:00
_str_ext_cvt(p, pp, &e);
return _ext_dbl_cvt(&e);
1988-08-11 12:49:06 +00:00
}
1989-07-26 11:08:24 +00:00
#endif NOFLOAT