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

Diff of /trunk/main.c

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

revision 107 by siliconforks, Sat May 31 07:38:46 2008 UTC revision 179 by siliconforks, Sun Sep 21 18:35:21 2008 UTC
# Line 23  Line 23 
23  #include <stdlib.h>  #include <stdlib.h>
24  #include <string.h>  #include <string.h>
25    
26    #include "global.h"
27  #include "instrument.h"  #include "instrument.h"
28  #include "instrument-js.h"  #include "instrument-js.h"
29  #include "resource-manager.h"  #include "resource-manager.h"
30  #include "util.h"  #include "util.h"
31    
32    const char * jscoverage_encoding = "ISO-8859-1";
33    bool jscoverage_highlight = true;
34    
35  int main(int argc, char ** argv) {  int main(int argc, char ** argv) {
36    int verbose = 0;    int verbose = 0;
37    
# Line 55  Line 59 
59      else if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbose") == 0) {      else if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--verbose") == 0) {
60        verbose = 1;        verbose = 1;
61      }      }
62        else if (strcmp(argv[i], "--no-highlight") == 0) {
63          jscoverage_highlight = false;
64        }
65      else if (strcmp(argv[i], "--no-instrument") == 0) {      else if (strcmp(argv[i], "--no-instrument") == 0) {
66        i++;        i++;
67        if (i == argc) {        if (i == argc) {
# Line 79  Line 86 
86        exclude[num_exclude] = argv[i] + 10;        exclude[num_exclude] = argv[i] + 10;
87        num_exclude++;        num_exclude++;
88      }      }
89        else if (strcmp(argv[i], "--encoding") == 0) {
90          i++;
91          if (i == argc) {
92            fatal("--encoding: option requires an argument");
93          }
94          jscoverage_encoding = argv[i];
95        }
96        else if (strncmp(argv[i], "--encoding=", 11) == 0) {
97          jscoverage_encoding = argv[i] + 11;
98        }
99      else if (strncmp(argv[i], "-", 1) == 0) {      else if (strncmp(argv[i], "-", 1) == 0) {
100        fatal("unrecognized option `%s'", argv[i]);        fatal("unrecognized option `%s'", argv[i]);
101      }      }

Legend:
Removed from v.107  
changed lines
  Added in v.179

  ViewVC Help
Powered by ViewVC 1.1.24