1 --- ecvt.c.orig Thu Jul 8 16:06:45 2004
2 +++ ecvt.c Fri Jul 9 12:23:51 2004
4 * Materiel Command, USAF, under agreement number F39502-99-1-0512.
7 +#include <sys/cdefs.h>
8 #if defined(LIBC_SCCS) && !defined(lint)
9 static char rcsid[] = "$OpenBSD: ecvt.c,v 1.3 2003/06/17 21:56:24 millert Exp $";
10 #endif /* LIBC_SCCS and not lint */
14 extern char *__dtoa(double, int, int, int *, int *, char **);
15 +extern void __freedtoa(char *); /* special gdtoa free function */
16 static char *__cvt(double, int, int *, int *, int, int);
19 -__cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad)
20 +__cvt(double value, int ndigit, int * __restrict decpt, int * __restrict sign, int fmode, int pad)
29 + rve = (*p == 'N') ? "nan" : "inf";
33 /* make a local copy and adjust rve to be in terms of s */
36 - if ((s = (char *)malloc(siz)) == NULL)
37 + if ((s = (char *)malloc(siz)) == NULL) {
41 (void) strlcpy(s, p, siz);
46 /* Add trailing zeros (unless we got NaN or Inf) */
51 -ecvt(double value, int ndigit, int *decpt, int *sign)
52 +ecvt(double value, int ndigit, int * __restrict decpt, int * __restrict sign)
54 return(__cvt(value, ndigit, decpt, sign, 0, 1));
58 -fcvt(double value, int ndigit, int *decpt, int *sign)
59 +fcvt(double value, int ndigit, int * __restrict decpt, int * __restrict sign)
61 return(__cvt(value, ndigit, decpt, sign, 1, 1));