2 * Copyright (C) 2000,2001,2003,2004 Manuel Novoa III <mjn3@codepoet.org>
4 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
10 #define _FPMAXTOSTR_H 1
18 #include <sys/types.h>
20 #ifdef __UCLIBC_HAS_FLOATS__
22 # include <bits/uClibc_fpmax.h>
24 /* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */
25 /* With 32 bit ints, we can get 9 decimal digits per block. */
26 # define DIGITS_PER_BLOCK 9
28 # define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
30 /* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */
31 /* extra space for '-', '.', 'e+###', and nul */
32 # define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
34 /* psm: why do these internals differ? */
35 # ifdef __USE_OLD_VFPRINTF__
36 typedef void (__fp_outfunc_t
)(FILE *fp
, intptr_t type
, intptr_t len
, intptr_t buf
);
38 extern size_t _fpmaxtostr(FILE * fp
, __fpmax_t x
, struct printf_info
*info
,
39 __fp_outfunc_t fp_outfunc
) attribute_hidden
;
41 typedef size_t (__fp_outfunc_t
)(FILE *fp
, intptr_t type
, intptr_t len
, intptr_t buf
);
43 extern ssize_t
_fpmaxtostr(FILE * fp
, __fpmax_t x
, struct printf_info
*info
,
44 __fp_outfunc_t fp_outfunc
) attribute_hidden
;
47 # endif /* __UCLIBC_HAS_FLOATS__ */
48 #endif /* _FPMAXTOSTR_H */