Updated path.
[AROS.git] / compiler / posixc / gcvt.c
blob69e718f3685348c79e4ab0e450c29811a2d46346
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 POSIX.1-2001 function gcvt().
6 Function is deprecated and removed from POSIX.1-2008
7 */
9 #include <stdio.h>
11 /*****************************************************************************
13 NAME */
14 #include <stdlib.h>
16 char * gcvt (
18 /* SYNOPSIS */
19 double number,
20 int ndigit,
21 char * buf
24 /* FUNCTION
25 Converts a number to a minimal length NULL terminated ASCII string.
26 It produces ndigit significant digits in either printf F format or
27 E format.
29 INPUTS
30 number - The number to convert.
31 ndigits - The number of significan digits that the string has to have.
32 buf - The buffer that will contain the result string.
34 RESULT
35 The address of the string pointed to by buf.
37 NOTES
38 This function is deprecated and not present anymore in POSIX.1-2008.
39 This function should not be used in new code and old code should
40 be fixed to remove usage.
41 This function is part of libposixc.a and may be removed in the future.
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 stdc.library/sprintf()
50 INTERNALS
52 ******************************************************************************/
54 sprintf (buf, "%.*G", ndigit, number);
56 return buf;
57 } /* sprintf */