comparison target-utils/libprintf/sprintf.c @ 0:e7502631a0f9

initial import from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 11 Jun 2016 00:13:35 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e7502631a0f9
1 #include <stdarg.h>
2
3 extern void _sprintf_putchar();
4
5 int
6 sprintf(char *strdest, char *fmt, ...)
7 {
8 va_list ap;
9 char *strptr;
10 int len;
11
12 strptr = strdest;
13 va_start(ap, fmt);
14 len = _doprnt(fmt, ap, &_sprintf_putchar, &strptr);
15 va_end(ap);
16 *strptr = '\0';
17 return(len);
18 }