a3db16f20d
Noted By: chris
40 lines
848 B
Text
40 lines
848 B
Text
--- sim/log.c.orig Wed Oct 7 04:52:51 1992
|
|
+++ sim/log.c Tue Dec 9 19:59:48 2003
|
|
@@ -23,7 +23,7 @@
|
|
#include "packet.h"
|
|
#include "event.h"
|
|
#include "log.h"
|
|
-#include <varargs.h>
|
|
+#include <stdarg.h>
|
|
|
|
#ifdef DEBUG
|
|
extern Log debug_log;
|
|
@@ -59,13 +59,7 @@
|
|
/* Debugging log-- writes name of component along with message */
|
|
/*VARARGS4*/
|
|
/*dbg_write(l, level, c, format, args)*/
|
|
-dbg_write(l, level, c, format, va_alist)
|
|
- Log l;
|
|
- int level;
|
|
- Component *c;
|
|
- char *format;
|
|
- va_dcl
|
|
-
|
|
+dbg_write(Log l, int level, Component *c, char *format, ... )
|
|
{
|
|
va_list p;
|
|
|
|
@@ -79,8 +73,12 @@
|
|
}
|
|
/* Add the time */
|
|
fprintf(l, "%d ", ev_now());
|
|
- va_start(p);
|
|
+ va_start(p, format);
|
|
+#ifdef __FreeBSD__
|
|
+ vfprintf(l, format, p);
|
|
+#else
|
|
_doprnt(format, p, l);
|
|
+#endif
|
|
va_end(p);
|
|
fputs("\n\0", l);
|
|
fflush(l);
|