version 1.11, 2005/01/20 23:47:04 |
version 1.12, 2005/01/21 19:11:02 |
|
|
#include "stdd.h" |
#include "stdd.h" |
#include "extern.h" |
#include "extern.h" |
|
|
FILE *traceout = stderr; |
FILE *traceout; |
|
|
#define TRACE_ARGS 1 |
#define TRACE_ARGS 1 |
#define TRACE_EXPANSION 2 |
#define TRACE_EXPANSION 2 |
|
|
trace_file(const char *name) |
trace_file(const char *name) |
{ |
{ |
|
|
if (traceout != stderr) |
if (traceout && traceout != stderr) |
fclose(traceout); |
fclose(traceout); |
traceout = fopen(name, "w"); |
traceout = fopen(name, "w"); |
if (!traceout) |
if (!traceout) |
|
|
ssize_t |
ssize_t |
trace(const char *argv[], int argc, struct input_file *inp) |
trace(const char *argv[], int argc, struct input_file *inp) |
{ |
{ |
|
if (!traceout) |
|
traceout = stderr; |
print_header(inp); |
print_header(inp); |
if (trace_flags & TRACE_CONT) { |
if (trace_flags & TRACE_CONT) { |
fprintf(traceout, "%s ...\n", argv[1]); |
fprintf(traceout, "%s ...\n", argv[1]); |