Deleted Added
full compact
scanf.c (104989) scanf.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[] = "@(#)scanf.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[] = "@(#)scanf.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/scanf.c 104989 2002-10-12 16:13:41Z mike $");
41__FBSDID("$FreeBSD: head/lib/libc/stdio/scanf.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
50scanf(char const * __restrict fmt, ...)
51{
52 int ret;
53 va_list ap;
54
55 va_start(ap, fmt);
56 FLOCKFILE(stdin);
57 ret = __svfscanf(stdin, fmt, ap);
58 FUNLOCKFILE(stdin);
59 va_end(ap);
60 return (ret);
61}
49
50int
51scanf(char const * __restrict fmt, ...)
52{
53 int ret;
54 va_list ap;
55
56 va_start(ap, fmt);
57 FLOCKFILE(stdin);
58 ret = __svfscanf(stdin, fmt, ap);
59 FUNLOCKFILE(stdin);
60 va_end(ap);
61 return (ret);
62}