improved layout

This commit is contained in:
ceriel
1988-04-25 16:17:29 +00:00
parent ca8e3270fc
commit 375b6fb802
6 changed files with 63 additions and 49 deletions

View File

@@ -3,24 +3,28 @@
#include <varargs.h>
char *sprintf(va_alist)
va_dcl
va_dcl
{
char *buf, *format;
FILE _tempfile;
va_list ap;
char *retval;
va_start(ap);
buf = va_arg(ap, char *);
format = va_arg(ap, char *);
_tempfile._fd = -1;
_tempfile._flags = IO_WRITEMODE + IO_UNBUFF;
_tempfile._buf = (unsigned char *) buf;
_tempfile._ptr = (unsigned char *) buf;
_tempfile._count = 32767;
{
char *buf = va_arg(ap, char *);
char *format = va_arg(ap, char *);
FILE _tempfile;
_doprnt(format, ap, &_tempfile);
putc('\0',&_tempfile);
retval = buf;
_tempfile._fd = -1;
_tempfile._flags = IO_WRITEMODE + IO_UNBUFF;
_tempfile._buf = (unsigned char *) buf;
_tempfile._ptr = (unsigned char *) buf;
_tempfile._count = 32767;
_doprnt(format, ap, &_tempfile);
putc('\0',&_tempfile);
}
va_end(ap);
return buf;
return retval;
}