Rev 4973 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>
#include <libc/file.h>
int
sprintf(char *str
, const char *fmt
, ...
)
{
FILE _strbuf;
int len;
va_list va;
_strbuf._flag = _IOWRT|_IOSTRG;
_strbuf._ptr = str;
_strbuf._cnt = INT_MAX;
len = _doprnt(fmt, va, &_strbuf);
*_strbuf._ptr = 0;
return len;
}