ack/lang/cem/libcc/stdio/vsprintf.c

25 lines
410 B
C
Raw Permalink Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
1991-10-22 09:50:57 +00:00
#include <stdio.h>
#include <varargs.h>
char *
vsprintf(s, format, arg)
char *s;
char *format;
va_list arg;
{
FILE tmp_stream;
tmp_stream._fd = -1;
tmp_stream._flags = IO_WRITEMODE + IO_UNBUFF;
tmp_stream._buf = (unsigned char *) s;
tmp_stream._ptr = (unsigned char *) s;
tmp_stream._count = 32767;
_doprnt(format, arg, &tmp_stream);
putc('\0',&tmp_stream);
return s;
}