Welcome to mirror list, hosted at ThFree Co, Russian Federation.

vsprintf.c « spu « machine « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 12461c08e6f9f4d89509eefd760211412188bff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

#include <_ansi.h>
#include <stdio.h>

#include "c99ppe.h"

#ifdef _HAVE_STDC
#include <stdarg.h>
#else
#include <varargs.h>
#endif

#ifdef INTEGER_ONLY
#  define vsprintf vsiprintf
#endif

typedef struct
{
  char *str;
  unsigned int pad0[ 3 ];
  char *fmt;
  unsigned int pad1[ 3 ];
  va_list ap;
} c99_vsprintf_t;

#ifndef _REENT_ONLY

int
_DEFUN (vsprintf, (str, fmt, ap),
     char *__restrict str,
     const char *__restrict fmt,
     va_list ap)
{
  c99_vsprintf_t args;

  CHECK_STR_INIT(_REENT);

  args.str = str;
  args.fmt = (char*) fmt;
  va_copy(args.ap,ap);

  return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
}

#endif /* ! _REENT_ONLY */