1*9b9d2a55Sguenther /* $OpenBSD: fwprintf.c,v 1.4 2015/08/31 02:53:57 guenther Exp $ */
225963022Sstsp /*-
325963022Sstsp * Copyright (c) 1990, 1993
425963022Sstsp * The Regents of the University of California. All rights reserved.
525963022Sstsp *
625963022Sstsp * This code is derived from software contributed to Berkeley by
725963022Sstsp * Chris Torek.
825963022Sstsp *
925963022Sstsp * Redistribution and use in source and binary forms, with or without
1025963022Sstsp * modification, are permitted provided that the following conditions
1125963022Sstsp * are met:
1225963022Sstsp * 1. Redistributions of source code must retain the above copyright
1325963022Sstsp * notice, this list of conditions and the following disclaimer.
1425963022Sstsp * 2. Redistributions in binary form must reproduce the above copyright
1525963022Sstsp * notice, this list of conditions and the following disclaimer in the
1625963022Sstsp * documentation and/or other materials provided with the distribution.
1725963022Sstsp * 3. Neither the name of the University nor the names of its contributors
1825963022Sstsp * may be used to endorse or promote products derived from this software
1925963022Sstsp * without specific prior written permission.
2025963022Sstsp *
2125963022Sstsp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2225963022Sstsp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2325963022Sstsp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2425963022Sstsp * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2525963022Sstsp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2625963022Sstsp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2725963022Sstsp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2825963022Sstsp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2925963022Sstsp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3025963022Sstsp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3125963022Sstsp * SUCH DAMAGE.
3225963022Sstsp */
3325963022Sstsp
3425963022Sstsp #include <stdio.h>
3525963022Sstsp #include <stdarg.h>
3625963022Sstsp #include <wchar.h>
3725963022Sstsp
3825963022Sstsp int
fwprintf(FILE * __restrict fp,const wchar_t * __restrict fmt,...)3925963022Sstsp fwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt, ...)
4025963022Sstsp {
4125963022Sstsp int ret;
4225963022Sstsp va_list ap;
4325963022Sstsp
4425963022Sstsp va_start(ap, fmt);
4525963022Sstsp ret = vfwprintf(fp, fmt, ap);
4625963022Sstsp va_end(ap);
4725963022Sstsp return (ret);
4825963022Sstsp }
49*9b9d2a55Sguenther DEF_STRONG(fwprintf);
50