Initial revision
This commit is contained in:
19
lang/cem/libcc/stdio/sprintf.c
Normal file
19
lang/cem/libcc/stdio/sprintf.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
|
||||
char *sprintf(buf,format,args)
|
||||
char *buf, *format;
|
||||
int args;
|
||||
{
|
||||
FILE _tempfile;
|
||||
|
||||
_tempfile._fd = -1;
|
||||
_tempfile._flags = IO_WRITEMODE + IO_UNBUFF;
|
||||
_tempfile._buf = (unsigned char *) buf;
|
||||
_tempfile._ptr = (unsigned char *) buf;
|
||||
_tempfile._count = 32767;
|
||||
|
||||
_doprintf(format, &args, &_tempfile);
|
||||
putc('\0',&_tempfile);
|
||||
|
||||
return buf;
|
||||
}
|
||||
Reference in New Issue
Block a user