1*47991Sdonn /*- 2*47991Sdonn * Copyright (c) 1990 The Regents of the University of California. 3*47991Sdonn * All rights reserved. 4*47991Sdonn * 5*47991Sdonn * This code is derived from software contributed to Berkeley by 6*47991Sdonn * Donn Seeley at UUNET Technologies, Inc. 7*47991Sdonn * 8*47991Sdonn * %sccs.include.redist.c% 9*47991Sdonn */ 10*47991Sdonn 11*47991Sdonn #if defined(LIBC_SCCS) && !defined(lint) 12*47991Sdonn static char sccsid[] = "@(#)vsscanf.c 5.1 (Berkeley) 04/15/91"; 13*47991Sdonn #endif /* LIBC_SCCS and not lint */ 14*47991Sdonn 15*47991Sdonn #include <stdio.h> 16*47991Sdonn #include <string.h> 17*47991Sdonn 18*47991Sdonn /* ARGSUSED */ 19*47991Sdonn static int 20*47991Sdonn eofread(cookie, buf, len) 21*47991Sdonn void *cookie; 22*47991Sdonn char *buf; 23*47991Sdonn int len; 24*47991Sdonn { 25*47991Sdonn 26*47991Sdonn return (0); 27*47991Sdonn } 28*47991Sdonn 29*47991Sdonn vsscanf(str, fmt, ap) 30*47991Sdonn const char *str; 31*47991Sdonn const char *fmt; 32*47991Sdonn _VA_LIST_ ap; 33*47991Sdonn { 34*47991Sdonn int ret; 35*47991Sdonn FILE f; 36*47991Sdonn 37*47991Sdonn f._flags = __SRD; 38*47991Sdonn f._bf._base = f._p = (unsigned char *)str; 39*47991Sdonn f._bf._size = f._r = strlen(str); 40*47991Sdonn f._read = eofread; 41*47991Sdonn f._ub._base = NULL; 42*47991Sdonn f._lb._base = NULL; 43*47991Sdonn return (__svfscanf(&f, fmt, ap)); 44*47991Sdonn } 45