156893Sfenner/*-
256893Sfenner * Copyright (c) 1990, 1993
356893Sfenner *	The Regents of the University of California.  All rights reserved.
456893Sfenner *
556893Sfenner * This code is derived from software contributed to Berkeley by
656893Sfenner * Chris Torek.
756893Sfenner *
856893Sfenner * Redistribution and use in source and binary forms, with or without
956893Sfenner * modification, are permitted provided that the following conditions
1056893Sfenner * are met:
1156893Sfenner * 1. Redistributions of source code must retain the above copyright
1256893Sfenner *    notice, this list of conditions and the following disclaimer.
1356893Sfenner * 2. Redistributions in binary form must reproduce the above copyright
1456893Sfenner *    notice, this list of conditions and the following disclaimer in the
1556893Sfenner *    documentation and/or other materials provided with the distribution.
1656893Sfenner * 4. Neither the name of the University nor the names of its contributors
1756893Sfenner *    may be used to endorse or promote products derived from this software
1856893Sfenner *    without specific prior written permission.
1956893Sfenner *
2056893Sfenner * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2175115Sfenner * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2256893Sfenner * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2356893Sfenner * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24276788Sdelphij * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2556893Sfenner * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2656893Sfenner * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2756893Sfenner * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2856893Sfenner * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29127668Sbms * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30127668Sbms * SUCH DAMAGE.
3156893Sfenner *
32111726Sfenner *	@(#)floatio.h	8.1 (Berkeley) 6/4/93
3356893Sfenner * $FreeBSD: releng/11.0/lib/libc/stdio/floatio.h 165903 2007-01-09 00:28:16Z imp $
34276788Sdelphij */
35276788Sdelphij
36276788Sdelphij/*
37276788Sdelphij * Floating point scanf/printf (input/output) definitions.
38276788Sdelphij */
3956893Sfenner
40276788Sdelphij/*
41276788Sdelphij * MAXEXPDIG is the maximum number of decimal digits needed to store a
42276788Sdelphij * floating point exponent in the largest supported format.  It should
43276788Sdelphij * be ceil(log10(LDBL_MAX_10_EXP)) or, if hexadecimal floating point
44276788Sdelphij * conversions are supported, ceil(log10(LDBL_MAX_EXP)).  But since it
45276788Sdelphij * is presently never greater than 5 in practice, we fudge it.
46276788Sdelphij */
47276788Sdelphij#define	MAXEXPDIG	6
48276788Sdelphij#if LDBL_MAX_EXP > 999999
49276788Sdelphij#error "floating point buffers too small"
50276788Sdelphij#endif
51276788Sdelphij
52276788Sdelphijchar *__hdtoa(double, const char *, int, int *, int *, char **);
53276788Sdelphijchar *__hldtoa(long double, const char *, int, int *, int *, char **);
54276788Sdelphijchar *__ldtoa(long double *, int, int, int *, int *, char **);
55276788Sdelphij