1*46111Sbostic /*- 2*46111Sbostic * Copyright (c) 1990 The Regents of the University of California. 3*46111Sbostic * All rights reserved. 4*46111Sbostic * 5*46111Sbostic * This code is derived from software contributed to Berkeley by 6*46111Sbostic * Chris Torek. 7*46111Sbostic * 8*46111Sbostic * %sccs.include.redist.c% 9*46111Sbostic */ 10*46111Sbostic 11*46111Sbostic #if defined(LIBC_SCCS) && !defined(lint) 12*46111Sbostic static char sccsid[] = "@(#)fscanf.c 5.1 (Berkeley) 01/20/91"; 13*46111Sbostic #endif /* LIBC_SCCS and not lint */ 14*46111Sbostic 15*46111Sbostic #include <stdio.h> 16*46111Sbostic #if __STDC__ 17*46111Sbostic #include <stdarg.h> 18*46111Sbostic #else 19*46111Sbostic #include <varargs.h> 20*46111Sbostic #endif 21*46111Sbostic 22*46111Sbostic #if __STDC__ 23*46111Sbostic fscanf(FILE *fp, char const *fmt, ...) { 24*46111Sbostic int ret; 25*46111Sbostic va_list ap; 26*46111Sbostic 27*46111Sbostic va_start(ap, fmt); 28*46111Sbostic #else 29*46111Sbostic fscanf(fp, fmt, va_alist) 30*46111Sbostic FILE *fp; 31*46111Sbostic char *fmt; 32*46111Sbostic va_dcl 33*46111Sbostic { 34*46111Sbostic int ret; 35*46111Sbostic va_list ap; 36*46111Sbostic 37*46111Sbostic va_start(ap); 38*46111Sbostic #endif 39*46111Sbostic ret = __svfscanf(fp, fmt, ap); 40*46111Sbostic va_end(ap); 41*46111Sbostic return (ret); 42*46111Sbostic } 43