1e0f95098SPeter Avalos /*-
2e0f95098SPeter Avalos * Copyright (c) 2009 David Schultz <das@FreeBSD.org>
3e0f95098SPeter Avalos * All rights reserved.
4e0f95098SPeter Avalos *
5e0f95098SPeter Avalos * Redistribution and use in source and binary forms, with or without
6e0f95098SPeter Avalos * modification, are permitted provided that the following conditions
7e0f95098SPeter Avalos * are met:
8e0f95098SPeter Avalos * 1. Redistributions of source code must retain the above copyright
9e0f95098SPeter Avalos * notice, this list of conditions and the following disclaimer.
10e0f95098SPeter Avalos * 2. Redistributions in binary form must reproduce the above copyright
11e0f95098SPeter Avalos * notice, this list of conditions and the following disclaimer in the
12e0f95098SPeter Avalos * documentation and/or other materials provided with the distribution.
13e0f95098SPeter Avalos *
14e0f95098SPeter Avalos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15e0f95098SPeter Avalos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16e0f95098SPeter Avalos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17e0f95098SPeter Avalos * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18e0f95098SPeter Avalos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19e0f95098SPeter Avalos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20e0f95098SPeter Avalos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21e0f95098SPeter Avalos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22e0f95098SPeter Avalos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23e0f95098SPeter Avalos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24e0f95098SPeter Avalos * SUCH DAMAGE.
25e0f95098SPeter Avalos *
26*f2a91d31Szrj * $FreeBSD: head/lib/libc/stdio/dprintf.c 303529 2016-07-30 01:16:06Z bapt $
27e0f95098SPeter Avalos */
28e0f95098SPeter Avalos
29e0f95098SPeter Avalos #include "namespace.h"
30e0f95098SPeter Avalos #include <stdarg.h>
31e0f95098SPeter Avalos #include <stdio.h>
32e0f95098SPeter Avalos #include "un-namespace.h"
33e0f95098SPeter Avalos
34e0f95098SPeter Avalos int
dprintf(int fd,const char * __restrict fmt,...)35e0f95098SPeter Avalos dprintf(int fd, const char * __restrict fmt, ...)
36e0f95098SPeter Avalos {
37e0f95098SPeter Avalos va_list ap;
38e0f95098SPeter Avalos int ret;
39e0f95098SPeter Avalos
40e0f95098SPeter Avalos va_start(ap, fmt);
41e0f95098SPeter Avalos ret = vdprintf(fd, fmt, ap);
42e0f95098SPeter Avalos va_end(ap);
43e0f95098SPeter Avalos return (ret);
44e0f95098SPeter Avalos }
45