| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.10

 

trace

#include "sfltron.h"
void
trace (const char *format, ...)

Synopsis

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.

Source Code - (sfltron.c)

{
    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     */
      }
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation