Pristine Ack-5.5
[Ack-5.5.git] / modules / src / print / fprint.c
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: fprint.c,v 1.9 1994/06/24 11:20:22 ceriel Exp $ */
6
7 #include <system.h>
8 #include "print.h"
9 #include "param.h"
10
11 /*FORMAT1v $
12         %s = char *
13         %l = long
14         %c = int
15         %[uxbo] = unsigned int
16         %d = int
17 $ */
18 /*VARARGS*/
19 void
20 fprint
21 #if __STDC__
22         (File *fp, char *fmt, ...)
23 {
24 #else
25         (va_alist)
26         va_dcl
27 {
28         File *fp;
29         char *fmt;
30 #endif
31         va_list args;
32         char buf[SSIZE];
33
34 #if __STDC__
35         va_start(args, fmt);
36 #else
37         va_start(args);
38         fp = va_arg(args, File *);
39         fmt = va_arg(args, char *);
40 #endif
41         sys_write(fp, buf, _format(buf, fmt, args));
42         va_end(args);
43 }