compiler/pthread: simulate compare and swap for m68k
[AROS.git] / compiler / stdc / sprintf.c
blobacd6f11266b76d57238e3d420ff401c3e5c0a28f
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function sprintf().
6 */
8 #define _LIBC_KERNEL_
10 /*****************************************************************************
12 NAME */
13 #include <stdio.h>
15 int sprintf (
17 /* SYNOPSIS */
18 char * str,
19 const char * format,
20 ...)
22 /* FUNCTION
23 Formats a list of arguments and writes them into the string str.
25 INPUTS
26 str - The formatted string is written into this variable. You
27 must make sure that it is large enough to contain the
28 result.
29 format - Format string as described above
30 ... - Arguments for the format string
32 RESULT
33 The number of characters written into the string.
35 NOTES
36 No checks are made that str is large enough for the result.
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 fprintf(), vprintf(), vfprintf(), snprintf(), vsprintf(),
44 vsnprintf()
46 INTERNALS
48 *****************************************************************************/
50 int retval;
51 va_list args;
53 va_start (args, format);
55 retval = vsprintf (str, format, args);
57 va_end (args);
59 return retval;
60 } /* sprintf */