xref: /original-bsd/usr.bin/window/wwprintf.c (revision c3e32dec)
1 /*
2  * Copyright (c) 1983, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Edward Wang at The University of California, Berkeley.
7  *
8  * %sccs.include.redist.c%
9  */
10 
11 #ifndef lint
12 static char sccsid[] = "@(#)wwprintf.c	8.1 (Berkeley) 06/06/93";
13 #endif /* not lint */
14 
15 #include "ww.h"
16 #include <varargs.h>
17 
18 /*VARARGS2*/
19 wwprintf(w, fmt, va_alist)
20 struct ww *w;
21 char *fmt;
22 va_dcl
23 {
24 	char buf[1024];
25 	va_list ap;
26 
27 	va_start(ap);
28 	/* buffer can overflow */
29 	(void) wwwrite(w, buf, vsprintf(buf, fmt, ap));
30 	va_end(ap);
31 }
32