mirror of
https://github.com/siemens-mobile-hacks/dc166-patch.git
synced 2026-11-25 19:37:24 +00:00
21 lines
440 B
C
21 lines
440 B
C
#include "dc166_stdio.h"
|
|
|
|
int sprintf(char *string, const char *format, ...)
|
|
{
|
|
FILE stream;
|
|
va_list arguments;
|
|
int result;
|
|
|
|
stream._ptr = string;
|
|
stream._base = string;
|
|
stream._cnt = 0x7fff;
|
|
stream._bufsiz = 0;
|
|
stream._flag = _IOWR | _IOSTRG;
|
|
stream._file = 0;
|
|
stream._wcnt = 0;
|
|
va_start(arguments, format);
|
|
result = _doprint(&stream, format, arguments);
|
|
va_end(arguments);
|
|
fputc(0, &stream);
|
|
return result;
|
|
}
|