]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/LibC/gdtoa/gdtoa.h
3 Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials are licensed and made available under
5 the terms and conditions of the BSD License that accompanies this distribution.
6 The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 The author of this software is David M. Gay.
14 Copyright (C) 1998 by Lucent Technologies
17 Permission to use, copy, modify, and distribute this software and
18 its documentation for any purpose and without fee is hereby
19 granted, provided that the above copyright notice appear in all
20 copies and that both that the copyright notice and this
21 permission notice and warranty disclaimer appear in supporting
22 documentation, and that the name of Lucent or any of its entities
23 not be used in advertising or publicity pertaining to
24 distribution of the software without specific, written prior
27 LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
28 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
29 IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
30 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
31 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
32 IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
33 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
36 $NetBSD: gdtoa.h,v 1.6.4.1.4.1 2008/04/08 21:10:55 jdc Exp
38 ****************************************************************/
40 /* Please send bug reports to David M. Gay (dmg at acm dot org,
41 * with " at " changed at "@" and " dot " changed to "."). */
43 #ifndef GDTOA_H_INCLUDED
44 #define GDTOA_H_INCLUDED
45 #include <LibConfig.h>
53 #define ULong uint32_t
56 #define UShort uint16_t
68 enum { /* return values from strtodg */
78 /* The following may be or-ed into one of the above values. */
83 STRTOG_Inexact
= 0x30,
84 STRTOG_Underflow
= 0x40,
85 STRTOG_Overflow
= 0x80,
86 STRTOG_NoMemory
= 0x100
98 enum { /* FPI.rounding values: same as FLT_ROUNDS */
110 #define gdtoa __gdtoa
111 #define ldtoa __ldtoa
112 #define hldtoa __hldtoa
113 #define hdtoa __hdtoa
114 #define freedtoa __freedtoa
115 #define strtodg __strtodg_D2A
116 #define strtopQ __strtopQ_D2A
117 #define strtopx __strtopx_D2A
118 #define strtopxL __strtopxL_D2A
119 #define strtord __strtord_D2A
121 extern char* dtoa
ANSI((double d
, int mode
, int ndigits
, int *decpt
,
122 int *sign
, char **rve
));
123 extern char* hdtoa
ANSI((double d
, const char *xdigs
, int ndigits
, int *decpt
,
124 int *sign
, char **rve
));
125 extern char* ldtoa
ANSI((long double *ld
, int mode
, int ndigits
, int *decpt
,
126 int *sign
, char **rve
));
127 extern char* hldtoa
ANSI((long double e
, const char *xdigs
, int ndigits
,
128 int *decpt
, int *sign
, char **rve
));
130 extern char* gdtoa
ANSI((FPI
*fpi
, int be
, ULong
*bits
, int *kindp
,
131 int mode
, int ndigits
, int *decpt
, char **rve
));
132 extern void freedtoa
ANSI((char*));
133 extern float strtof
ANSI((CONST
char *, char **));
134 extern double strtod
ANSI((CONST
char *, char **));
135 extern int strtodg
ANSI((CONST
char*, char**, CONST FPI
*, Long
*, ULong
*));
137 extern char* g_ddfmt
ANSI((char*, double*, int, unsigned));
138 extern char* g_dfmt
ANSI((char*, double*, int, unsigned));
139 extern char* g_ffmt
ANSI((char*, float*, int, unsigned));
140 extern char* g_Qfmt
ANSI((char*, void*, int, unsigned));
141 extern char* g_xfmt
ANSI((char*, void*, int, unsigned));
142 extern char* g_xLfmt
ANSI((char*, void*, int, unsigned));
144 extern int strtoId
ANSI((CONST
char*, char**, double*, double*));
145 extern int strtoIdd
ANSI((CONST
char*, char**, double*, double*));
146 extern int strtoIf
ANSI((CONST
char*, char**, float*, float*));
147 extern int strtoIQ
ANSI((CONST
char*, char**, void*, void*));
148 extern int strtoIx
ANSI((CONST
char*, char**, void*, void*));
149 extern int strtoIxL
ANSI((CONST
char*, char**, void*, void*));
150 extern int strtord
ANSI((CONST
char*, char**, int, double*));
151 extern int strtordd
ANSI((CONST
char*, char**, int, double*));
152 extern int strtorf
ANSI((CONST
char*, char**, int, float*));
153 extern int strtorQ
ANSI((CONST
char*, char**, int, void*));
154 extern int strtorx
ANSI((CONST
char*, char**, int, void*));
155 extern int strtorxL
ANSI((CONST
char*, char**, int, void*));
157 extern int strtodI
ANSI((CONST
char*, char**, double*));
158 extern int strtopd
ANSI((CONST
char*, char**, double*));
159 extern int strtopdd
ANSI((CONST
char*, char**, double*));
160 extern int strtopf
ANSI((CONST
char*, char**, float*));
161 extern int strtopQ
ANSI((CONST
char*, char**, void*));
162 extern int strtopx
ANSI((CONST
char*, char**, void*));
163 extern int strtopxL
ANSI((CONST
char*, char**, void*));
168 #endif /* GDTOA_H_INCLUDED */