]>
git.saurik.com Git - apple/libc.git/blob - gdtoa/FreeBSD/gdtoa.h
62553f2ed05d6b8a12b59e62b1a464b2d960f301
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
31 Bell Laboratories, Room 2C-463
33 Murray Hill, NJ 07974-0636
38 #ifndef GDTOA_H_INCLUDED
39 #define GDTOA_H_INCLUDED
47 typedef unsigned Long ULong
;
50 typedef unsigned short UShort
;
56 #define Void /*nothing*/
65 #define CONST /* blank */
71 enum { /* return values from strtodg */
81 /* The following may be or-ed into one of the above values. */
86 STRTOG_Inexact
= 0x30,
87 STRTOG_Underflow
= 0x40,
88 STRTOG_Overflow
= 0x80
100 enum { /* FPI.rounding values: same as FLT_ROUNDS */
111 extern char* dtoa
ANSI((double d
, int mode
, int ndigits
, int *decpt
,
112 int *sign
, char **rve
));
113 extern char* gdtoa
ANSI((FPI
*fpi
, int be
, ULong
*bits
, int *kindp
,
114 int mode
, int ndigits
, int *decpt
, char **rve
));
115 extern void freedtoa
ANSI((char*));
116 extern float strtof
ANSI((CONST
char *, char **));
117 extern double strtod
ANSI((CONST
char *, char **));
118 extern int strtodg
ANSI((CONST
char*, char**, FPI
*, Long
*, ULong
*));
120 extern char* g_ddfmt
ANSI((char*, double*, int, unsigned));
121 extern char* g_dfmt
ANSI((char*, double*, int, unsigned));
122 extern char* g_ffmt
ANSI((char*, float*, int, unsigned));
123 extern char* g_Qfmt
ANSI((char*, void*, int, unsigned));
124 extern char* g_xfmt
ANSI((char*, void*, int, unsigned));
125 extern char* g_xLfmt
ANSI((char*, void*, int, unsigned));
127 extern int strtoId
ANSI((CONST
char*, char**, double*, double*));
128 extern int strtoIdd
ANSI((CONST
char*, char**, double*, double*));
129 extern int strtoIf
ANSI((CONST
char*, char**, float*, float*));
130 extern int strtoIQ
ANSI((CONST
char*, char**, void*, void*));
131 extern int strtoIx
ANSI((CONST
char*, char**, void*, void*));
132 extern int strtoIxL
ANSI((CONST
char*, char**, void*, void*));
133 extern int strtord
ANSI((CONST
char*, char**, int, double*));
134 extern int strtordd
ANSI((CONST
char*, char**, int, double*));
135 extern int strtorf
ANSI((CONST
char*, char**, int, float*));
136 extern int strtorQ
ANSI((CONST
char*, char**, int, void*));
137 extern int strtorx
ANSI((CONST
char*, char**, int, void*));
138 extern int strtorxL
ANSI((CONST
char*, char**, int, void*));
140 extern int strtodI
ANSI((CONST
char*, char**, double*));
141 extern int strtopd
ANSI((CONST
char*, char**, double*));
142 extern int strtopdd
ANSI((CONST
char*, char**, double*));
143 extern int strtopf
ANSI((CONST
char*, char**, float*));
144 extern int strtopQ
ANSI((CONST
char*, char**, void*));
145 extern int strtopx
ANSI((CONST
char*, char**, void*));
146 extern int strtopxL
ANSI((CONST
char*, char**, void*));
148 #define strtopd(s,se,x) strtord(s,se,1,x)
149 #define strtopdd(s,se,x) strtordd(s,se,1,x)
150 #define strtopf(s,se,x) strtorf(s,se,1,x)
151 #define strtopQ(s,se,x) strtorQ(s,se,1,x)
152 #define strtopx(s,se,x) strtorx(s,se,1,x)
153 #define strtopxL(s,se,x) strtorxL(s,se,1,x)
159 #endif /* GDTOA_H_INCLUDED */