Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / stdio / vwscanf.c
blobc994bad457a6666f0f5bdd8b6265db4ca56fa244
1 /*-
2 * Code created by modifying scanf.c which has following copyright.
4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved.
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 * and/or 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.
19 /* Doc in vfwscanf.c */
21 #include <_ansi.h>
22 #include <reent.h>
23 #include <stdio.h>
24 #include <wchar.h>
25 #include <stdarg.h>
26 #include "local.h"
28 #ifndef _REENT_ONLY
30 int
31 vwscanf (const wchar_t *__restrict fmt, va_list ap)
33 struct _reent *reent = _REENT;
35 _REENT_SMALL_CHECK_INIT (reent);
36 return __svfwscanf_r (reent, _stdin_r (reent), fmt, ap);
39 #endif /* !_REENT_ONLY */
41 int
42 _vwscanf_r (struct _reent *ptr, const wchar_t *fmt, va_list ap)
44 _REENT_SMALL_CHECK_INIT (ptr);
45 return __svfwscanf_r (ptr, _stdin_r (ptr), fmt, ap);