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

Diff of /trunk/instrument.c

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

revision 576 by siliconforks, Sat Jan 2 04:55:54 2010 UTC revision 577 by siliconforks, Thu Sep 9 22:39:11 2010 UTC
# Line 71  Line 71 
71  }  }
72    
73  static void instrument_file(const char * source_file, const char * destination_file, const char * id, int instrumenting) {  static void instrument_file(const char * source_file, const char * destination_file, const char * id, int instrumenting) {
   if (g_verbose) {  
     printf("Instrumenting file %s\n", id);  
   }  
   
74    /* check if they are the same */    /* check if they are the same */
75    char * canonical_source_file = make_canonical_path(source_file);    char * canonical_source_file = make_canonical_path(source_file);
76    char * canonical_destination_file = make_canonical_path(destination_file);    char * canonical_destination_file = make_canonical_path(destination_file);
# Line 87  Line 83 
83      switch (file_type) {      switch (file_type) {
84      case FILE_TYPE_OTHER:      case FILE_TYPE_OTHER:
85      case FILE_TYPE_HTML:      case FILE_TYPE_HTML:
86          if (g_verbose) {
87            printf("Copying file %s\n", id);
88          }
89        copy_file(source_file, destination_file);        copy_file(source_file, destination_file);
90        break;        break;
91      case FILE_TYPE_JS:      case FILE_TYPE_JS:
92        {        {
93            if (g_verbose) {
94              printf("Instrumenting file %s\n", id);
95            }
96    
97          FILE * input = xfopen(source_file, "rb");          FILE * input = xfopen(source_file, "rb");
98          FILE * output = xfopen(destination_file, "wb");          FILE * output = xfopen(destination_file, "wb");
99    
# Line 133  Line 136 
136      }      }
137    }    }
138    else {    else {
139        if (g_verbose) {
140          printf("Copying file %s (on --no-instrument list)\n", id);
141        }
142    
143      copy_file(source_file, destination_file);      copy_file(source_file, destination_file);
144    }    }
145  }  }

Legend:
Removed from v.576  
changed lines
  Added in v.577

  ViewVC Help
Powered by ViewVC 1.1.24