diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gsm-fw/sprintf/old/sprintf.c	Thu Nov 14 17:51:33 2013 +0000
@@ -0,0 +1,16 @@
+#include <stdarg.h>
+
+int
+sprintf(char *strdest, char *fmt, ...)
+{
+	va_list ap;
+	char *strptr;
+	int len;
+
+	strptr = strdest;
+	va_start(ap, fmt);
+	len = _doprnt(fmt, ap, &strptr);
+	va_end(ap);
+	*strptr = '\0';
+	return(len);
+}