VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/StdLib/LibC/gdtoa/gdtoa.h@ 77599

最後變更 在這個檔案從77599是 58459,由 vboxsync 提交於 9 年 前

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

  • 屬性 svn:eol-style 設為 native
檔案大小: 5.5 KB
 
1/** @file
2
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.
8
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.
11
12The author of this software is David M. Gay.
13
14Copyright (C) 1998 by Lucent Technologies
15All Rights Reserved
16
17Permission to use, copy, modify, and distribute this software and
18its documentation for any purpose and without fee is hereby
19granted, provided that the above copyright notice appear in all
20copies and that both that the copyright notice and this
21permission notice and warranty disclaimer appear in supporting
22documentation, and that the name of Lucent or any of its entities
23not be used in advertising or publicity pertaining to
24distribution of the software without specific, written prior
25permission.
26
27LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
28INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
29IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
30SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
31WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
32IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
33ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
34THIS SOFTWARE.
35
36 $NetBSD: gdtoa.h,v 1.6.4.1.4.1 2008/04/08 21:10:55 jdc Exp
37
38****************************************************************/
39
40/* Please send bug reports to David M. Gay (dmg at acm dot org,
41 * with " at " changed at "@" and " dot " changed to "."). */
42
43#ifndef GDTOA_H_INCLUDED
44#define GDTOA_H_INCLUDED
45#include <LibConfig.h>
46
47#include "arith.h"
48
49#ifndef Long
50#define Long int32_t
51#endif
52#ifndef ULong
53#define ULong uint32_t
54#endif
55#ifndef UShort
56#define UShort uint16_t
57#endif
58
59#ifndef ANSI
60#define ANSI(x) x
61#define Void void
62#endif /* ANSI */
63
64#ifndef CONST
65#define CONST const
66#endif /* CONST */
67
68enum { /* return values from strtodg */
69 STRTOG_Zero = 0,
70 STRTOG_Normal = 1,
71 STRTOG_Denormal = 2,
72 STRTOG_Infinite = 3,
73 STRTOG_NaN = 4,
74 STRTOG_NaNbits = 5,
75 STRTOG_NoNumber = 6,
76 STRTOG_Retmask = 7,
77
78 /* The following may be or-ed into one of the above values. */
79
80 STRTOG_Neg = 0x08,
81 STRTOG_Inexlo = 0x10,
82 STRTOG_Inexhi = 0x20,
83 STRTOG_Inexact = 0x30,
84 STRTOG_Underflow= 0x40,
85 STRTOG_Overflow = 0x80,
86 STRTOG_NoMemory = 0x100
87};
88
89 typedef struct
90FPI {
91 int nbits;
92 int emin;
93 int emax;
94 int rounding;
95 int sudden_underflow;
96} FPI;
97
98enum { /* FPI.rounding values: same as FLT_ROUNDS */
99 FPI_Round_zero = 0,
100 FPI_Round_near = 1,
101 FPI_Round_up = 2,
102 FPI_Round_down = 3
103};
104
105#ifdef __cplusplus
106extern "C" {
107#endif
108
109#define dtoa __dtoa
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
120
121extern char* dtoa ANSI((double d, int mode, int ndigits, int *decpt,
122 int *sign, char **rve));
123extern char* hdtoa ANSI((double d, const char *xdigs, int ndigits, int *decpt,
124 int *sign, char **rve));
125extern char* ldtoa ANSI((long double *ld, int mode, int ndigits, int *decpt,
126 int *sign, char **rve));
127extern char* hldtoa ANSI((long double e, const char *xdigs, int ndigits,
128 int *decpt, int *sign, char **rve));
129
130extern char* gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp,
131 int mode, int ndigits, int *decpt, char **rve));
132extern void freedtoa ANSI((char*));
133extern float strtof ANSI((CONST char *, char **));
134extern double strtod ANSI((CONST char *, char **));
135extern int strtodg ANSI((CONST char*, char**, CONST FPI*, Long*, ULong*));
136
137extern char* g_ddfmt ANSI((char*, double*, int, unsigned));
138extern char* g_dfmt ANSI((char*, double*, int, unsigned));
139extern char* g_ffmt ANSI((char*, float*, int, unsigned));
140extern char* g_Qfmt ANSI((char*, void*, int, unsigned));
141extern char* g_xfmt ANSI((char*, void*, int, unsigned));
142extern char* g_xLfmt ANSI((char*, void*, int, unsigned));
143
144extern int strtoId ANSI((CONST char*, char**, double*, double*));
145extern int strtoIdd ANSI((CONST char*, char**, double*, double*));
146extern int strtoIf ANSI((CONST char*, char**, float*, float*));
147extern int strtoIQ ANSI((CONST char*, char**, void*, void*));
148extern int strtoIx ANSI((CONST char*, char**, void*, void*));
149extern int strtoIxL ANSI((CONST char*, char**, void*, void*));
150extern int strtord ANSI((CONST char*, char**, int, double*));
151extern int strtordd ANSI((CONST char*, char**, int, double*));
152extern int strtorf ANSI((CONST char*, char**, int, float*));
153extern int strtorQ ANSI((CONST char*, char**, int, void*));
154extern int strtorx ANSI((CONST char*, char**, int, void*));
155extern int strtorxL ANSI((CONST char*, char**, int, void*));
156
157extern int strtodI ANSI((CONST char*, char**, double*));
158extern int strtopd ANSI((CONST char*, char**, double*));
159extern int strtopdd ANSI((CONST char*, char**, double*));
160extern int strtopf ANSI((CONST char*, char**, float*));
161extern int strtopQ ANSI((CONST char*, char**, void*));
162extern int strtopx ANSI((CONST char*, char**, void*));
163extern int strtopxL ANSI((CONST char*, char**, void*));
164
165#ifdef __cplusplus
166}
167#endif
168#endif /* GDTOA_H_INCLUDED */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette