Commit | Line | Data |
---|---|---|
60de5df9 | 1 | /* |
46e9ea25 KB |
2 | * Copyright (c) 1983 Regents of the University of California. |
3 | * All rights reserved. | |
4 | * | |
3dd3a9e5 KB |
5 | * This code is derived from software contributed to Berkeley by |
6 | * Edward Wang at The University of California, Berkeley. | |
7 | * | |
87f529ec | 8 | * %sccs.include.redist.c% |
60de5df9 EW |
9 | */ |
10 | ||
46e9ea25 | 11 | #ifndef lint |
3dd3a9e5 | 12 | static char sccsid[] = "@(#)wwprintf.c 3.11 (Berkeley) %G%"; |
46e9ea25 KB |
13 | #endif /* not lint */ |
14 | ||
972e1ce8 | 15 | #include "ww.h" |
b15b4a3f | 16 | #include <varargs.h> |
972e1ce8 | 17 | |
85af59e4 | 18 | /*VARARGS2*/ |
b15b4a3f | 19 | wwprintf(w, fmt, va_alist) |
972e1ce8 EW |
20 | struct ww *w; |
21 | char *fmt; | |
b15b4a3f | 22 | va_dcl |
972e1ce8 | 23 | { |
4222244b | 24 | char buf[1024]; |
b15b4a3f | 25 | va_list ap; |
972e1ce8 | 26 | |
b15b4a3f | 27 | va_start(ap); |
74a85b7f EW |
28 | /* buffer can overflow */ |
29 | (void) wwwrite(w, buf, vsprintf(buf, fmt, ap)); | |
b15b4a3f | 30 | va_end(ap); |
972e1ce8 | 31 | } |