comparison target-utils/libprintf/sprintf.c @ 11:40f607bb0a2c

target-utils refactored
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 01 May 2013 07:39:35 +0000
parents loadagent/libprintf/sprintf.c@5c7b3d5d5702
children
comparison
equal deleted inserted replaced
10:e2e80a09338e 11:40f607bb0a2c
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 }