xref: /dragonfly/lib/libc/stdio/vwscanf.c (revision 58a28d8c)
162f08720SJoerg Sonnenberger /*-
262f08720SJoerg Sonnenberger  * Copyright (c) 2002 Tim J. Robbins
362f08720SJoerg Sonnenberger  * All rights reserved.
462f08720SJoerg Sonnenberger  *
562f08720SJoerg Sonnenberger  * Redistribution and use in source and binary forms, with or without
662f08720SJoerg Sonnenberger  * modification, are permitted provided that the following conditions
762f08720SJoerg Sonnenberger  * are met:
862f08720SJoerg Sonnenberger  * 1. Redistributions of source code must retain the above copyright
962f08720SJoerg Sonnenberger  *    notice, this list of conditions and the following disclaimer.
1062f08720SJoerg Sonnenberger  * 2. Redistributions in binary form must reproduce the above copyright
1162f08720SJoerg Sonnenberger  *    notice, this list of conditions and the following disclaimer in the
1262f08720SJoerg Sonnenberger  *    documentation and/or other materials provided with the distribution.
1362f08720SJoerg Sonnenberger  *
1462f08720SJoerg Sonnenberger  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1562f08720SJoerg Sonnenberger  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1662f08720SJoerg Sonnenberger  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1762f08720SJoerg Sonnenberger  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1862f08720SJoerg Sonnenberger  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1962f08720SJoerg Sonnenberger  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2062f08720SJoerg Sonnenberger  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2162f08720SJoerg Sonnenberger  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2262f08720SJoerg Sonnenberger  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2362f08720SJoerg Sonnenberger  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2462f08720SJoerg Sonnenberger  * SUCH DAMAGE.
25e0f95098SPeter Avalos  *
26e0f95098SPeter Avalos  * $FreeBSD: src/lib/libc/stdio/vwscanf.c,v 1.1 2002/09/23 12:40:06 tjr Exp $
2762f08720SJoerg Sonnenberger  */
2862f08720SJoerg Sonnenberger 
2962f08720SJoerg Sonnenberger #include <stdarg.h>
3062f08720SJoerg Sonnenberger #include <stdio.h>
3162f08720SJoerg Sonnenberger #include <wchar.h>
32*58a28d8cSSascha Wildner #include <xlocale.h>
3362f08720SJoerg Sonnenberger 
3462f08720SJoerg Sonnenberger int
vwscanf(const wchar_t * __restrict fmt,va_list ap)3562f08720SJoerg Sonnenberger vwscanf(const wchar_t * __restrict fmt, va_list ap)
3662f08720SJoerg Sonnenberger {
3762f08720SJoerg Sonnenberger 
3862f08720SJoerg Sonnenberger 	return (vfwscanf(stdin, fmt, ap));
3962f08720SJoerg Sonnenberger }
40*58a28d8cSSascha Wildner 
41*58a28d8cSSascha Wildner int
vwscanf_l(locale_t locale,const wchar_t * __restrict fmt,va_list ap)42*58a28d8cSSascha Wildner vwscanf_l(locale_t locale, const wchar_t * __restrict fmt, va_list ap)
43*58a28d8cSSascha Wildner {
44*58a28d8cSSascha Wildner 	return (vfwscanf_l(stdin, locale, fmt, ap));
45*58a28d8cSSascha Wildner }
46