I made a syntax error in some .e file, and em_encode dumped core because a 64-bit pointer didn't fit in a 32-bit int. Now use stdarg to pass pointers to error() and fatal(). Stop using the number of errors as the exit status. Many systems use only the low 8 bits of the exit status, so 256 errors would become 0. Also change modules/src/print to accept const char *buf
28 lines
491 B
C
28 lines
491 B
C
/*
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
*/
|
|
/* $Id$ */
|
|
|
|
#include <system.h>
|
|
#include "print.h"
|
|
#include "param.h"
|
|
|
|
/*FORMAT0v $
|
|
%s = char *
|
|
%l = long
|
|
%c = int
|
|
%[uxbo] = unsigned int
|
|
%d = int
|
|
$ */
|
|
/*VARARGS*/
|
|
void
|
|
print(const char *fmt, ...)
|
|
{
|
|
va_list args;
|
|
char buf[SSIZE];
|
|
|
|
va_start(args, fmt);
|
|
sys_write(STDOUT, buf, _format(buf, fmt, args));
|
|
va_end(args);
|
|
}
|