comparison loadagent/libprintf/sprintf.c @ 3:45bf8af5f061

libprintf brought in from older PPC/m68k code, but fucking GCC refuses to compile <varargs.h> - need to convert to Anshit C <stdarg.h>
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 29 Apr 2013 07:00:22 +0000
parents
children 5c7b3d5d5702
comparison
equal deleted inserted replaced
2:ddda170fa6f4 3:45bf8af5f061
1 #include <varargs.h>
2
3 extern void _sprintf_putchar();
4
5 int
6 sprintf(va_alist)
7 va_dcl
8 {
9 va_list ap;
10 char *strptr;
11 char *fmt;
12 int len;
13
14 va_start(ap);
15 strptr = va_arg(ap, char *);
16 fmt = va_arg(ap, char *);
17 len = _doprnt(fmt, ap, &_sprintf_putchar, &strptr);
18 *strptr = '\0';
19 va_end(ap);
20 return(len);
21 }