aboutsummaryrefslogtreecommitdiffhomepage
path: root/osdep/vsscanf.c
blob: 0252ac287f947ebafcba74c42965715f9fd718c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "config.h"

#ifndef	HAVE_VSSCANF
/* system has no vsscanf.  try to provide one */

#include <stdio.h>
#include <stdarg.h>

int
vsscanf(const char *str, const char *format, va_list ap)
{
    /* XXX: can this be implemented in a more portable way? */
    long p1 = va_arg(ap, long);
    long p2 = va_arg(ap, long);
    long p3 = va_arg(ap, long);
    long p4 = va_arg(ap, long);
    long p5 = va_arg(ap, long);
    return sscanf(str, format, p1, p2, p3, p4, p5);
}
#endif