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

Diff of /trunk/jscoverage.c

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

trunk/main.c revision 339 by siliconforks, Fri Oct 24 16:13:57 2008 UTC trunk/jscoverage.c revision 454 by siliconforks, Mon Sep 7 17:39:47 2009 UTC
# Line 1  Line 1 
1  /*  /*
2      main.c - JSCoverage main routine      jscoverage.c - main routine for `jscoverage' program
3      Copyright (C) 2007, 2008 siliconforks.com      Copyright (C) 2007, 2008, 2009 siliconforks.com
4    
5      This program is free software; you can redistribute it and/or modify      This program is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published by      it under the terms of the GNU General Public License as published by
# Line 35  Line 35 
35  int main(int argc, char ** argv) {  int main(int argc, char ** argv) {
36    int verbose = 0;    int verbose = 0;
37    
   // program = argv[0];  
38    program = "jscoverage";    program = "jscoverage";
39    
40    char * source = NULL;    char * source = NULL;
# Line 49  Line 48 
48    
49    for (int i = 1; i < argc; i++) {    for (int i = 1; i < argc; i++) {
50      if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) {      if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) {
51        copy_resource_to_stream("help.txt", stdout);        copy_resource_to_stream("jscoverage-help.txt", stdout);
52        exit(EXIT_SUCCESS);        exit(EXIT_SUCCESS);
53      }      }
54      else if (strcmp(argv[i], "-V") == 0 || strcmp(argv[i], "--version") == 0) {      else if (strcmp(argv[i], "-V") == 0 || strcmp(argv[i], "--version") == 0) {
# Line 61  Line 60 
60      else if (strcmp(argv[i], "--no-highlight") == 0) {      else if (strcmp(argv[i], "--no-highlight") == 0) {
61        jscoverage_highlight = false;        jscoverage_highlight = false;
62      }      }
63        else if (strcmp(argv[i], "--mozilla") == 0) {
64          jscoverage_mode = JSCOVERAGE_MOZILLA;
65          jscoverage_set_js_version("180");
66        }
67        else if (strcmp(argv[i], "--no-browser") == 0) {
68          jscoverage_mode = JSCOVERAGE_NO_BROWSER;
69        }
70      else if (strcmp(argv[i], "--no-instrument") == 0) {      else if (strcmp(argv[i], "--no-instrument") == 0) {
71        i++;        i++;
72        if (i == argc) {        if (i == argc) {

Legend:
Removed from v.339  
changed lines
  Added in v.454

  ViewVC Help
Powered by ViewVC 1.1.24