/[jscoverage]/trunk/instrument.c
ViewVC logotype

Diff of /trunk/instrument.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 116 by siliconforks, Sat May 31 21:42:36 2008 UTC revision 174 by siliconforks, Sat Sep 20 23:27:14 2008 UTC
# Line 29  Line 29 
29  #include <sys/stat.h>  #include <sys/stat.h>
30  #include <sys/types.h>  #include <sys/types.h>
31    
32    #include "global.h"
33  #include "instrument-js.h"  #include "instrument-js.h"
34  #include "resource-manager.h"  #include "resource-manager.h"
35  #include "util.h"  #include "util.h"
# Line 52  Line 53 
53      return FILE_TYPE_HTML;      return FILE_TYPE_HTML;
54    }    }
55    else {    else {
56      return FILE_TYPE_UNKNOWN;      return FILE_TYPE_OTHER;
57    }    }
58  }  }
59    
# Line 83  Line 84 
84    if (instrumenting) {    if (instrumenting) {
85      enum FileType file_type = get_file_type(source_file);      enum FileType file_type = get_file_type(source_file);
86      switch (file_type) {      switch (file_type) {
87      case FILE_TYPE_UNKNOWN:      case FILE_TYPE_OTHER:
88      case FILE_TYPE_HTML:      case FILE_TYPE_HTML:
89        copy_file(source_file, destination_file);        copy_file(source_file, destination_file);
90        break;        break;
# Line 97  Line 98 
98    
99          Stream_write_file_contents(input_stream, input);          Stream_write_file_contents(input_stream, input);
100    
101          jscoverage_instrument_js(id, input_stream, output_stream);          jscoverage_instrument_js(id, jscoverage_encoding, input_stream, output_stream);
102    
103          if (fwrite(output_stream->data, 1, output_stream->length, output) != output_stream->length) {          if (fwrite(output_stream->data, 1, output_stream->length, output) != output_stream->length) {
104            fatal("cannot write to file: %s", destination_file);            fatal("cannot write to file: %s", destination_file);

Legend:
Removed from v.116  
changed lines
  Added in v.174

  ViewVC Help
Powered by ViewVC 1.1.24