1*2561b634Sjoerg /* $NetBSD: vwprintf.c,v 1.3 2013/04/19 15:22:25 joerg Exp $ */
2f432bbb6Schristos
3f432bbb6Schristos /*-
4f432bbb6Schristos * Copyright (c) 2002 Tim J. Robbins
5f432bbb6Schristos * All rights reserved.
6f432bbb6Schristos *
7f432bbb6Schristos * Redistribution and use in source and binary forms, with or without
8f432bbb6Schristos * modification, are permitted provided that the following conditions
9f432bbb6Schristos * are met:
10f432bbb6Schristos * 1. Redistributions of source code must retain the above copyright
11f432bbb6Schristos * notice, this list of conditions and the following disclaimer.
12f432bbb6Schristos * 2. Redistributions in binary form must reproduce the above copyright
13f432bbb6Schristos * notice, this list of conditions and the following disclaimer in the
14f432bbb6Schristos * documentation and/or other materials provided with the distribution.
15f432bbb6Schristos *
16f432bbb6Schristos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17f432bbb6Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18f432bbb6Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19f432bbb6Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20f432bbb6Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21f432bbb6Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22f432bbb6Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23f432bbb6Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24f432bbb6Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25f432bbb6Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26f432bbb6Schristos * SUCH DAMAGE.
27f432bbb6Schristos */
28f432bbb6Schristos
29f432bbb6Schristos #include <sys/cdefs.h>
30f432bbb6Schristos #if defined(LIBC_SCCS) && !defined(lint)
31f432bbb6Schristos #if 0
32f432bbb6Schristos __FBSDID("$FreeBSD: src/lib/libc/stdio/vwprintf.c,v 1.1 2002/09/21 13:00:30 tjr Exp $");
33f432bbb6Schristos #else
34*2561b634Sjoerg __RCSID("$NetBSD: vwprintf.c,v 1.3 2013/04/19 15:22:25 joerg Exp $");
35f432bbb6Schristos #endif
36f432bbb6Schristos #endif /* LIBC_SCCS and not lint */
37f432bbb6Schristos
38*2561b634Sjoerg #include "namespace.h"
39f432bbb6Schristos #include <stdarg.h>
40f432bbb6Schristos #include <stdio.h>
41f432bbb6Schristos #include <wchar.h>
42f432bbb6Schristos
__weak_alias(vwprintf_l,_vwprintf_l)43*2561b634Sjoerg __weak_alias(vwprintf_l, _vwprintf_l)
44*2561b634Sjoerg
45*2561b634Sjoerg int
46*2561b634Sjoerg vwprintf_l(locale_t loc, const wchar_t * __restrict fmt, va_list ap)
47*2561b634Sjoerg {
48*2561b634Sjoerg return vfwprintf_l(stdout, loc, fmt, ap);
49*2561b634Sjoerg }
50*2561b634Sjoerg
51f432bbb6Schristos int
vwprintf(const wchar_t * __restrict fmt,va_list ap)52f432bbb6Schristos vwprintf(const wchar_t * __restrict fmt, va_list ap)
53f432bbb6Schristos {
54f432bbb6Schristos
55526d9427Schristos return vfwprintf(stdout, fmt, ap);
56f432bbb6Schristos }
57