2006-12-19 04:39:02 +08:00
|
|
|
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "c99ppe.h"
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
2007-02-21 04:58:38 +08:00
|
|
|
#ifdef INTEGER_ONLY
|
|
|
|
# define vsprintf vsiprintf
|
|
|
|
#endif
|
|
|
|
|
2006-12-19 04:39:02 +08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char *str;
|
|
|
|
unsigned int pad0[ 3 ];
|
|
|
|
char *fmt;
|
|
|
|
unsigned int pad1[ 3 ];
|
|
|
|
va_list ap;
|
|
|
|
} c99_vsprintf_t;
|
|
|
|
|
2007-02-02 00:43:45 +08:00
|
|
|
#ifndef _REENT_ONLY
|
|
|
|
|
2006-12-19 04:39:02 +08:00
|
|
|
int
|
2017-12-04 11:43:30 +08:00
|
|
|
vsprintf (char *__restrict str,
|
2017-12-04 10:25:16 +08:00
|
|
|
const char *__restrict fmt,
|
2006-12-19 04:39:02 +08:00
|
|
|
va_list ap)
|
|
|
|
{
|
|
|
|
c99_vsprintf_t args;
|
2007-02-02 00:43:45 +08:00
|
|
|
|
|
|
|
CHECK_STR_INIT(_REENT);
|
|
|
|
|
2006-12-19 04:39:02 +08:00
|
|
|
args.str = str;
|
|
|
|
args.fmt = (char*) fmt;
|
|
|
|
va_copy(args.ap,ap);
|
|
|
|
|
2007-05-24 05:41:17 +08:00
|
|
|
return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
|
2006-12-19 04:39:02 +08:00
|
|
|
}
|
2007-02-02 00:43:45 +08:00
|
|
|
|
|
|
|
#endif /* ! _REENT_ONLY */
|