vsscanf.c (333fc21e3cd79bca0c94d7722c5a56cb5ad078d1) vsscanf.c (e74101e4eff767325553039def89de70b70f36d3)
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 * Donn Seeley at UUNET Technologies, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 28 unchanged lines hidden (view full) ---

37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)vsscanf.c 8.1 (Berkeley) 6/4/93";
39#endif /* LIBC_SCCS and not lint */
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD$");
42
43#include <stdio.h>
44#include <string.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 * Donn Seeley at UUNET Technologies, Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 28 unchanged lines hidden (view full) ---

37#if defined(LIBC_SCCS) && !defined(lint)
38static char sccsid[] = "@(#)vsscanf.c 8.1 (Berkeley) 6/4/93";
39#endif /* LIBC_SCCS and not lint */
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD$");
42
43#include <stdio.h>
44#include <string.h>
45#include "local.h"
45
46static int
47eofread(void *, char *, int);
48
49/* ARGSUSED */
50static int
51eofread(cookie, buf, len)
52 void *cookie;

--- 6 unchanged lines hidden (view full) ---

59
60int
61vsscanf(str, fmt, ap)
62 const char *str;
63 const char *fmt;
64 _BSD_VA_LIST_ ap;
65{
66 FILE f;
46
47static int
48eofread(void *, char *, int);
49
50/* ARGSUSED */
51static int
52eofread(cookie, buf, len)
53 void *cookie;

--- 6 unchanged lines hidden (view full) ---

60
61int
62vsscanf(str, fmt, ap)
63 const char *str;
64 const char *fmt;
65 _BSD_VA_LIST_ ap;
66{
67 FILE f;
68 struct __sFILEX ext;
67
68 f._file = -1;
69 f._flags = __SRD;
70 f._bf._base = f._p = (unsigned char *)str;
71 f._bf._size = f._r = strlen(str);
72 f._read = eofread;
73 f._ub._base = NULL;
74 f._lb._base = NULL;
69
70 f._file = -1;
71 f._flags = __SRD;
72 f._bf._base = f._p = (unsigned char *)str;
73 f._bf._size = f._r = strlen(str);
74 f._read = eofread;
75 f._ub._base = NULL;
76 f._lb._base = NULL;
77 f._extra = &ext;
78 INITEXTRA(&f);
75 return (__svfscanf(&f, fmt, ap));
76}
79 return (__svfscanf(&f, fmt, ap));
80}