1
/****************************************************************
3
The author of this software is David M. Gay.
5
Copyright (C) 1998 by Lucent Technologies
8
Permission to use, copy, modify, and distribute this software and
9
its documentation for any purpose and without fee is hereby
10
granted, provided that the above copyright notice appear in all
11
copies and that both that the copyright notice and this
12
permission notice and warranty disclaimer appear in supporting
13
documentation, and that the name of Lucent or any of its entities
14
not be used in advertising or publicity pertaining to
15
distribution of the software without specific, written prior
18
LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
19
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
20
IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
21
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
23
IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
27
****************************************************************/
29
/* Please send bug reports to David M. Gay (dmg at acm dot org,
30
* with " at " changed at "@" and " dot " changed to "."). */
32
/* Modified by Danny Smith for inclusion in libmingwex.a
35
#ifndef GDTOA_H_INCLUDED
36
#define GDTOA_H_INCLUDED
39
#include <stddef.h> /* for size_t */
41
#if defined(__MINGW32__) || defined(__MINGW64__)
42
/* keep the 'Long' definition as 'long' for compatibility
43
* with older/other software. long in w64 is 32 bits anyway..
45
#define Long long /* int */
46
#undef NO_LONG_LONG /* we have long long type */
53
typedef unsigned Long ULong;
56
typedef unsigned short UShort;
59
enum { /* return values from strtodg */
69
/* The following may be or-ed into one of the above values. */
71
STRTOG_Neg = 0x08, /* does not affect STRTOG_Inexlo or STRTOG_Inexhi */
72
STRTOG_Inexlo = 0x10, /* returned result rounded toward zero */
73
STRTOG_Inexhi = 0x20, /* returned result rounded away from zero */
74
STRTOG_Inexact = 0x30,
75
STRTOG_Underflow= 0x40,
76
STRTOG_Overflow = 0x80
88
enum { /* FPI.rounding values: same as FLT_ROUNDS */
99
extern char* __dtoa (double d, int mode, int ndigits, int *decpt,
100
int *sign, char **rve);
101
extern char* __gdtoa (FPI *fpi, int be, ULong *bits, int *kindp,
102
int mode, int ndigits, int *decpt, char **rve);
103
extern void __freedtoa (char *);
105
extern float __strtof (const char *, char **);
106
extern double __strtod (const char *, char **);
107
extern long double __strtold (const char *, char **);
108
extern int __strtodg (const char *, char **, FPI *, Long *, ULong *);
110
extern char* __g__fmt (char*, char*, char*, int, ULong, size_t);
111
extern char* __g_dfmt (char*, double*, int, size_t);
112
extern char* __g_ffmt (char*, float*, int, size_t);
113
extern char* __g_xfmt (char*, void*, int, size_t);
118
#endif /* GDTOA_H_INCLUDED */