Build Envy24 driver.
[AROS.git] / compiler / stdc / vsprintf.c
blobe1282ece61de2c9166d27140fb7f390003f56199
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function vsprintf().
6 */
7 /* Original source from libnix */
10 static int _vsprintf_uc (int c, char ** str)
12 *(*str)++ = c;
13 return 1;
16 /*****************************************************************************
18 NAME */
19 #include <stdio.h>
20 #include <stdarg.h>
22 int vsprintf (
24 /* SYNOPSIS */
25 char * str,
26 const char * format,
27 va_list args)
29 /* FUNCTION
30 Format a list of arguments and put them into the string str.
32 INPUTS
33 str - The formatted result is stored here
34 format - A printf() format string.
35 args - A list of arguments for the format string.
37 RESULT
38 The number of characters written.
40 NOTES
41 No check is made that str is large enough to contain the result.
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 printf(), sprintf(), fprintf(), vprintf(), vfprintf(), snprintf(),
49 vsnprintf()
51 INTERNALS
53 ******************************************************************************/
55 int rc;
57 rc = __vcformat (&str, (void *)_vsprintf_uc, format, args);
59 *str = 0;
61 return rc;
62 } /* vsprintf */