ack/modules/src/print/print.c

42 lines
623 B
C
Raw Normal View History

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".
*/
1987-01-05 17:37:37 +00:00
/* $Header$ */
#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"
/*FORMAT0v $
%s = char *
%l = long
%c = int
%[uxbo] = unsigned int
%d = int
$ */
/*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
}