1987-03-09 15:15:03 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
1994-06-24 11:31:16 +00:00
|
|
|
/* $Id$ */
|
1987-01-05 17:37:37 +00:00
|
|
|
|
|
|
|
#include <system.h>
|
1993-11-10 12:09:49 +00:00
|
|
|
#include "print.h"
|
1987-01-05 17:37:37 +00:00
|
|
|
#include "param.h"
|
|
|
|
|
1989-02-07 11:17:22 +00:00
|
|
|
/*FORMAT0v $
|
|
|
|
%s = char *
|
|
|
|
%l = long
|
|
|
|
%c = int
|
|
|
|
%[uxbo] = unsigned int
|
|
|
|
%d = int
|
|
|
|
$ */
|
1993-03-18 13:09:55 +00:00
|
|
|
/*VARARGS*/
|
1993-11-10 12:09:49 +00:00
|
|
|
void
|
|
|
|
print
|
|
|
|
#if __STDC__
|
|
|
|
(char *fmt, ...)
|
|
|
|
{
|
|
|
|
#else
|
|
|
|
(va_alist)
|
1988-04-15 15:34:19 +00:00
|
|
|
va_dcl
|
1987-01-05 17:37:37 +00:00
|
|
|
{
|
1988-04-15 15:34:19 +00:00
|
|
|
char *fmt;
|
1993-11-10 12:09:49 +00:00
|
|
|
#endif
|
1988-04-15 15:34:19 +00:00
|
|
|
va_list args;
|
1987-01-05 17:37:37 +00:00
|
|
|
char buf[SSIZE];
|
|
|
|
|
1993-11-10 12:09:49 +00:00
|
|
|
#if __STDC__
|
|
|
|
va_start(args, fmt);
|
|
|
|
#else
|
1988-04-15 15:34:19 +00:00
|
|
|
va_start(args);
|
|
|
|
fmt = va_arg(args, char *);
|
1993-11-10 12:09:49 +00:00
|
|
|
#endif
|
1988-04-15 15:34:19 +00:00
|
|
|
sys_write(STDOUT, buf, _format(buf, fmt, args));
|
|
|
|
va_end(args);
|
1987-01-05 17:37:37 +00:00
|
|
|
}
|