1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1987-01-27 15:57:55 +00:00
|
|
|
#include <stdio.h>
|
1988-04-15 14:43:19 +00:00
|
|
|
#include <varargs.h>
|
1987-01-27 15:57:55 +00:00
|
|
|
|
1988-04-15 14:43:19 +00:00
|
|
|
int sscanf(va_alist)
|
1988-04-25 16:17:29 +00:00
|
|
|
va_dcl
|
1987-01-27 15:57:55 +00:00
|
|
|
{
|
1988-04-15 14:43:19 +00:00
|
|
|
va_list ap;
|
|
|
|
int retval;
|
1987-01-27 15:57:55 +00:00
|
|
|
|
1988-04-15 14:43:19 +00:00
|
|
|
va_start(ap);
|
1988-04-25 16:17:29 +00:00
|
|
|
{
|
|
|
|
char *string = va_arg(ap, char *);
|
|
|
|
char *format = va_arg(ap, char *);
|
|
|
|
FILE _tempfile;
|
1987-01-27 15:57:55 +00:00
|
|
|
|
1988-04-25 16:17:29 +00:00
|
|
|
_tempfile._fd = -1;
|
|
|
|
_tempfile._flags = IO_READMODE + IO_UNBUFF;
|
|
|
|
_tempfile._buf = (unsigned char *) string;
|
|
|
|
_tempfile._ptr = (unsigned char *) string;
|
1990-05-09 13:31:36 +00:00
|
|
|
_tempfile._count = strlen(string);
|
1988-04-25 16:17:29 +00:00
|
|
|
|
|
|
|
retval = _doscanf (&_tempfile, format, ap);
|
|
|
|
}
|
1988-04-15 14:43:19 +00:00
|
|
|
va_end(ap);
|
1988-04-25 16:17:29 +00:00
|
|
|
|
1988-04-15 14:43:19 +00:00
|
|
|
return retval;
|
1987-01-27 15:57:55 +00:00
|
|
|
}
|