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

/* 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);
}