[BACK]Return to trace.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / m4

Diff for /src/usr.bin/m4/trace.c between version 1.11 and 1.12

version 1.11, 2005/01/20 23:47:04 version 1.12, 2005/01/21 19:11:02
Line 33 
Line 33 
 #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
Line 56 
Line 56 
 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)
Line 145 
Line 145 
 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]);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12