make to use varargs.h

This commit is contained in:
ceriel
1988-04-15 14:43:19 +00:00
parent 16e2e6f346
commit ecaea97a99
8 changed files with 140 additions and 94 deletions

View File

@@ -1,18 +1,26 @@
/* $Header$ */
#include <stdio.h>
#include <varargs.h>
int sscanf (string, format, args)
char *string; /* source of data */
char *format; /* control string */
unsigned args; /* our args */
int sscanf(va_alist)
va_dcl
{
char *string; /* source of data */
char *format; /* control string */
FILE _tempfile;
va_list ap;
int retval;
_tempfile._fd = -1;
_tempfile._flags = IO_READMODE + IO_UNBUFF;
_tempfile._buf = (unsigned char *) string;
_tempfile._ptr = (unsigned char *) string;
_tempfile._count = 32767;
va_start(ap);
string = va_arg(ap, char *);
format = va_arg(ap, char *);
_tempfile._fd = -1;
_tempfile._flags = IO_READMODE + IO_UNBUFF;
_tempfile._buf = (unsigned char *) string;
_tempfile._ptr = (unsigned char *) string;
_tempfile._count = 32767;
return _doscanf (&_tempfile, format, &args);
retval = _doscanf (&_tempfile, format, ap);
va_end(ap);
return retval;
}