FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/sprintf/old/sprintf.c @ 145:7e45ada9c365
gsm-fw: sprintf overhaul in preparation for adding %f format support
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 14 Nov 2013 17:51:33 +0000 |
parents | gsm-fw/sprintf/sprintf.c@afceeeb2cba1 |
children |
comparison
equal
deleted
inserted
replaced
144:ea819b60fe0d | 145:7e45ada9c365 |
---|---|
1 #include <stdarg.h> | |
2 | |
3 int | |
4 sprintf(char *strdest, char *fmt, ...) | |
5 { | |
6 va_list ap; | |
7 char *strptr; | |
8 int len; | |
9 | |
10 strptr = strdest; | |
11 va_start(ap, fmt); | |
12 len = _doprnt(fmt, ap, &strptr); | |
13 va_end(ap); | |
14 *strptr = '\0'; | |
15 return(len); | |
16 } |