source: trunk/libs/newlib/src/newlib/libc/stdio/vscanf.c

Last change on this file was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.6 KB
Line 
1/*-
2 * Code created by modifying scanf.c which has following copyright.
3 *
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms are permitted
8 * provided that the above copyright notice and this paragraph are
9 * duplicated in all such forms and that any documentation,
10 * advertising materials, and other materials related to such
11 * distribution and use acknowledge that the software was developed
12 * by the University of California, Berkeley.  The name of the
13 * University may not be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 */
19
20#include <_ansi.h>
21#include <reent.h>
22#include <stdio.h>
23#include <stdarg.h>
24#include "local.h"
25
26#ifndef _REENT_ONLY
27
28int
29vscanf (const char *fmt,
30       va_list ap)
31{
32  struct _reent *reent = _REENT;
33
34  _REENT_SMALL_CHECK_INIT (reent);
35  return __svfscanf_r (reent, _stdin_r (reent), fmt, ap);
36}
37
38#ifdef _NANO_FORMATTED_IO
39int
40viscanf (const char *, __VALIST) _ATTRIBUTE ((__alias__("vscanf")));
41#endif
42
43#endif /* !_REENT_ONLY */
44
45int
46_vscanf_r (struct _reent *ptr,
47       const char *__restrict fmt,
48       va_list ap)
49{
50  _REENT_SMALL_CHECK_INIT (ptr);
51  return __svfscanf_r (ptr, _stdin_r (ptr), fmt, ap);
52}
53
54#ifdef _NANO_FORMATTED_IO
55int
56_viscanf_r (struct _reent *, const char *, __VALIST)
57       _ATTRIBUTE ((__alias__("_vscanf_r")));
58#endif
Note: See TracBrowser for help on using the repository browser.