fscanf.c (104989) | fscanf.c (108622) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 24 unchanged lines hidden (view full) --- 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#if defined(LIBC_SCCS) && !defined(lint) 38static char sccsid[] = "@(#)fscanf.c 8.1 (Berkeley) 6/4/93"; 39#endif /* LIBC_SCCS and not lint */ 40#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Chris Torek. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 24 unchanged lines hidden (view full) --- 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#if defined(LIBC_SCCS) && !defined(lint) 38static char sccsid[] = "@(#)fscanf.c 8.1 (Berkeley) 6/4/93"; 39#endif /* LIBC_SCCS and not lint */ 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/lib/libc/stdio/fscanf.c 104989 2002-10-12 16:13:41Z mike $"); | 41__FBSDID("$FreeBSD: head/lib/libc/stdio/fscanf.c 108622 2003-01-03 23:27:27Z tjr $"); |
42 43#include "namespace.h" 44#include <stdio.h> 45#include <stdarg.h> 46#include "un-namespace.h" 47#include "libc_private.h" | 42 43#include "namespace.h" 44#include <stdio.h> 45#include <stdarg.h> 46#include "un-namespace.h" 47#include "libc_private.h" |
48#include "local.h" |
|
48 49int 50fscanf(FILE * __restrict fp, char const * __restrict fmt, ...) 51{ 52 int ret; 53 va_list ap; 54 55 va_start(ap, fmt); 56 FLOCKFILE(fp); 57 ret = __svfscanf(fp, fmt, ap); 58 va_end(ap); 59 FUNLOCKFILE(fp); 60 return (ret); 61} | 49 50int 51fscanf(FILE * __restrict fp, char const * __restrict fmt, ...) 52{ 53 int ret; 54 va_list ap; 55 56 va_start(ap, fmt); 57 FLOCKFILE(fp); 58 ret = __svfscanf(fp, fmt, ap); 59 va_end(ap); 60 FUNLOCKFILE(fp); 61 return (ret); 62} |