OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [machine/] [spu/] [vsnprintf.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#include <_ansi.h>
2
#include <stdio.h>
3
 
4
#include "c99ppe.h"
5
 
6
#ifdef _HAVE_STDC
7
#include <stdarg.h>
8
#else
9
#include <varargs.h>
10
#endif
11
 
12
#ifdef INTEGER_ONLY
13
#  define vsnprintf vsniprintf
14
#endif
15
 
16
typedef struct
17
{
18
  char* str;
19
  unsigned int pad0[ 3 ];
20
  size_t size;
21
  unsigned int pad1[ 3 ];
22
  _CONST char* fmt;
23
  unsigned int pad2[ 3 ];
24
  va_list ap;
25
} c99_vsnprintf_t;
26
 
27
#ifndef _REENT_ONLY
28
 
29
int
30
_DEFUN (vsnprintf, (str, size, fmt, ap),
31
     char *str _AND
32
     size_t size _AND
33
     _CONST char *fmt _AND
34
     va_list ap)
35
{
36
  c99_vsnprintf_t args;
37
 
38
  CHECK_STR_INIT(_REENT);
39
 
40
  args.str = str;
41
  args.size = size;
42
  args.fmt = fmt;
43
  va_copy(args.ap,ap);
44
 
45
  return __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
46
}
47
 
48
#endif /* ! _REENT_ONLY */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.