mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-11 03:29:09 +08:00
* libc/machine/spu/c99ppe.h: New file * libc/machine/spu/perror.c: New file to override libc/stdio version. * libc/machine/spu/printf.c: New file * libc/machine/spu/putchar.c: New file * libc/machine/spu/puts.c: New file * libc/machine/spu/vprintf.c: New file * libc/machine/spu/vsnprintf.c: New file * libc/machine/spu/vsprintf.c: New file * libc/machine/spu/Makefile.am: Add new targets. * libc/machine/spu/Makefile.in: Regenerated.
40 lines
570 B
C
40 lines
570 B
C
|
|
#include <_ansi.h>
|
|
#include <stdio.h>
|
|
|
|
#include "c99ppe.h"
|
|
|
|
#ifdef _HAVE_STDC
|
|
#include <stdarg.h>
|
|
#else
|
|
#include <varargs.h>
|
|
#endif
|
|
|
|
typedef struct
|
|
{
|
|
char *str;
|
|
unsigned int pad0[ 3 ];
|
|
char *fmt;
|
|
unsigned int pad1[ 3 ];
|
|
va_list ap;
|
|
} c99_vsprintf_t;
|
|
|
|
int
|
|
_DEFUN (vsprintf, (str, fmt, ap),
|
|
char *str _AND
|
|
_CONST char *fmt _AND
|
|
va_list ap)
|
|
{
|
|
int* ret;
|
|
c99_vsprintf_t args;
|
|
ret = (int*) &args;
|
|
|
|
args.str = str;
|
|
args.fmt = (char*) fmt;
|
|
va_copy(args.ap,ap);
|
|
|
|
send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
|
|
|
|
return *ret;
|
|
}
|