define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / compiler / clib / vsprintf.c
blob0b92c2dad342c2b92de2ba2e8053c93eb33c1bca
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 C 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 beeing made that str is large enough to contain
42 the result.
44 EXAMPLE
46 BUGS
48 SEE ALSO
49 printf(), sprintf(), fprintf(), vprintf(), vfprintf(), snprintf(),
50 vsnprintf()
52 INTERNALS
54 ******************************************************************************/
56 int rc;
58 rc = __vcformat (&str, (void *)_vsprintf_uc, format, args);
60 *str = 0;
62 return rc;
63 } /* vsprintf */