147991Sdonn /*- 247991Sdonn * Copyright (c) 1990 The Regents of the University of California. 347991Sdonn * All rights reserved. 447991Sdonn * 547991Sdonn * This code is derived from software contributed to Berkeley by 647991Sdonn * Donn Seeley at UUNET Technologies, Inc. 747991Sdonn * 847991Sdonn * %sccs.include.redist.c% 947991Sdonn */ 1047991Sdonn 1147991Sdonn #if defined(LIBC_SCCS) && !defined(lint) 12*54268Sbostic static char sccsid[] = "@(#)vsscanf.c 5.2 (Berkeley) 06/23/92"; 1347991Sdonn #endif /* LIBC_SCCS and not lint */ 1447991Sdonn 1547991Sdonn #include <stdio.h> 1647991Sdonn #include <string.h> 1747991Sdonn 1847991Sdonn /* ARGSUSED */ 1947991Sdonn static int 2047991Sdonn eofread(cookie, buf, len) 2147991Sdonn void *cookie; 2247991Sdonn char *buf; 2347991Sdonn int len; 2447991Sdonn { 2547991Sdonn 2647991Sdonn return (0); 2747991Sdonn } 2847991Sdonn 2947991Sdonn vsscanf(str, fmt, ap) 3047991Sdonn const char *str; 3147991Sdonn const char *fmt; 32*54268Sbostic _BSD_VA_LIST_ ap; 3347991Sdonn { 3447991Sdonn int ret; 3547991Sdonn FILE f; 3647991Sdonn 3747991Sdonn f._flags = __SRD; 3847991Sdonn f._bf._base = f._p = (unsigned char *)str; 3947991Sdonn f._bf._size = f._r = strlen(str); 4047991Sdonn f._read = eofread; 4147991Sdonn f._ub._base = NULL; 4247991Sdonn f._lb._base = NULL; 4347991Sdonn return (__svfscanf(&f, fmt, ap)); 4447991Sdonn } 45