Pristine Ack-5.5
[Ack-5.5.git] / modules / src / print / print.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: print.c,v 1.9 1994/06/24 11:20:33 ceriel Exp $ */
6
7 #include <system.h>
8 #include "print.h"
9 #include "param.h"
10
11 /*FORMAT0v $
12         %s = char *
13         %l = long
14         %c = int
15         %[uxbo] = unsigned int
16         %d = int
17 $ */
18 /*VARARGS*/
19 void
20 print
21 #if __STDC__
22         (char *fmt, ...)
23 {
24 #else
25         (va_alist)
26         va_dcl
27 {
28         char *fmt;
29 #endif
30         va_list args;
31         char buf[SSIZE];
32
33 #if __STDC__
34         va_start(args, fmt);
35 #else
36         va_start(args);
37         fmt = va_arg(args, char *);
38 #endif
39         sys_write(STDOUT, buf, _format(buf, fmt, args));
40         va_end(args);
41 }