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

Diff of /trunk/instrument.c

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

revision 69 by siliconforks, Thu Nov 22 01:50:33 2007 UTC revision 70 by siliconforks, Thu Nov 22 02:52:38 2007 UTC
# Line 162  Line 162 
162        copy_file(source_file, destination_file);        copy_file(source_file, destination_file);
163        break;        break;
164      case FILE_TYPE_JS:      case FILE_TYPE_JS:
       highlight_file(source_file, destination_file, id);  
165        {        {
166          FILE * input = xfopen(source_file, "r");          FILE * input = xfopen(source_file, "r");
167          FILE * output = xfopen(destination_file, "w");          FILE * output = xfopen(destination_file, "w");
168          jscoverage_instrument_js(id, input, output);          const char * suffix = ".jscoverage.js";
169            char temporary_file_name[strlen(destination_file) + strlen(suffix) + 1];
170            strcpy(temporary_file_name, destination_file);
171            strcat(temporary_file_name, suffix);
172            jscoverage_instrument_js(id, input, output, temporary_file_name);
173          fclose(input);          fclose(input);
174          fclose(output);          fclose(output);
175        }        }
176          highlight_file(source_file, destination_file, id);
177        break;        break;
178      }      }
179    }    }

Legend:
Removed from v.69  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.24