FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/sprintf/sprintf.c @ 502:cff42ff57c60
osx.c: osx_free_mem() done
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 01 Jul 2014 18:34:53 +0000 |
parents | 7e45ada9c365 |
children |
rev | line source |
---|---|
79
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include <stdarg.h> |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 int |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 sprintf(char *strdest, char *fmt, ...) |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 { |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 va_list ap; |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 int len; |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 va_start(ap, fmt); |
145
7e45ada9c365
gsm-fw: sprintf overhaul in preparation for adding %f format support
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
143
diff
changeset
|
10 len = vsprintf(strdest, fmt, ap); |
79
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 va_end(ap); |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 return(len); |
947b1f473960
beginning of nuc-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 } |