| iMatix home page | << | < | > | >> |
SFL Version 2.10 |
#include "sfltron.h" void trace (const char *format, ...)
If the global variable trace_state is TRUE, this function formats the parameters (using printf() conventions) and sends these to stdout, or the trace_file if opened using set trace file(). The trace output is given a newline automatically. Reentrant. Uses globals.
{ va_list argptr; /* Argument list pointer */ FILE *out = stdout; /* Output by default to stdout */ if (trace_state) { va_start (argptr, format); /* Start variable args processing */ if (trace_file) out = trace_file; /* Output message: date: message text\n */ print_time_str (out); fputs (": ", out); vfprintf (out, format, argptr); fputs ("\n", out); fflush (out); va_end (argptr); /* End variable args processing */ } }
| << | < | > | >> | Copyright © 1996-99 iMatix Corporation |