Fossil

Changes On Branch andygoth-help-option
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch andygoth-help-option Excluding Merge-Ins

This is equivalent to a diff from 7bc11da241 to 3a9017f9d1

2015-06-22
04:37
Integrate andygoth-help-option. check-in: 100ac83b64 user: andygoth tags: trunk
2015-06-19
22:19
Permit full dynamic linking when compiling with MSVC. Also, enable the building of the in-tree zlib to be skipped.' check-in: 7932cb3f05 user: mistachkin tags: trunk
21:54
Merge updates from trunk. Closed-Leaf check-in: 7fd7c4ca57 user: mistachkin tags: dynamicMsvc
20:36
Updated Makefile.msc generation: Add an option for creating a dynamically linked fossil binary. Make it possible to opt-out of building zlib. Edit: Closed branch as dynamicMsvc branch already does what this intends to do, and more. Closed-Leaf check-in: 2a0bc313fb user: jan tags: jan-dynlnk-win
16:19
Rework -help implementation so -help can be added to any command line even if it already contained an option that the help command would have interpreted. For example, "fossil clean -x -help" now prints help about the clean command, whereas before it was did the same as "fossil help -x", i.e. list auxiliary commands without mentioning clean. Make sure to fall back on the current implementation so "fossil -help -x" and such still work correctly. Closed-Leaf check-in: 3a9017f9d1 user: andygoth tags: andygoth-help-option
15:44
Merge trunk. Leaf check-in: cc8e56f19e user: andygoth tags: andygoth-quote-apostrophe
15:44
Merge trunk. check-in: 21220b21b7 user: andygoth tags: andygoth-brackets-outside-link
14:40
Remove ugly and zero-information comment text from linenoise.c. check-in: 7bc11da241 user: drh tags: trunk
09:03
Update internal Unicode character tables, used in regular expression handling, from version 7.0 to 8.0. check-in: 192c8266ef user: jan.nijtmans tags: trunk

Changes to src/main.c.

681
682
683
684
685
686
687
688


689
690
691


692



693





694
695

696
697
698
699
700
701
702
703
    fossil_init_flags_from_options();
    if( find_option("utc",0,0) ) g.fTimeFormat = 1;
    if( find_option("localtime",0,0) ) g.fTimeFormat = 2;
    if( zChdir && file_chdir(zChdir, 0) ){
      fossil_fatal("unable to change directories to %s", zChdir);
    }
    if( find_option("help",0,0)!=0 ){
      /* --help anywhere on the command line is translated into


      ** "fossil help argv[1] argv[2]..." */
      int i;
      char **zNewArgv = fossil_malloc( sizeof(char*)*(g.argc+2) );


      for(i=1; i<g.argc; i++) zNewArgv[i+1] = g.argv[i];



      zNewArgv[i+1] = 0;





      zNewArgv[0] = g.argv[0];
      zNewArgv[1] = "help";

      g.argc++;
      g.argv = zNewArgv;
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  /* There is a bug in stunnel4 in which it sometimes starts up client
  ** processes without first opening file descriptor 2 (standard error).







|
>
>
|
|

>
>
|
>
>
>
|
>
>
>
>
>
|
|
>
|







681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
    fossil_init_flags_from_options();
    if( find_option("utc",0,0) ) g.fTimeFormat = 1;
    if( find_option("localtime",0,0) ) g.fTimeFormat = 2;
    if( zChdir && file_chdir(zChdir, 0) ){
      fossil_fatal("unable to change directories to %s", zChdir);
    }
    if( find_option("help",0,0)!=0 ){
      /* If --help is found anywhere on the command line, translate the command
       * to "fossil help cmdname" where "cmdname" is the first argument that
       * does not begin with a "-" character.  If all arguments start with "-",
       * translate to "fossil help argv[1] argv[2]...". */
      int i, nNewArgc;
      char **zNewArgv = fossil_malloc( sizeof(char*)*(g.argc+2) );
      zNewArgv[0] = g.argv[0];
      zNewArgv[1] = "help";
      for(i=1; i<g.argc; i++){
        if( g.argv[i][0]!='-' ){
          nNewArgc = 3;
          zNewArgv[2] = g.argv[i];
          zNewArgv[3] = 0;
          break;
        }
      }
      if( i==g.argc ){
        for(i=1; i<g.argc; i++) zNewArgv[i+1] = g.argv[i];
        nNewArgc = g.argc+1;
        zNewArgv[i+1] = 0;
      }
      g.argc = nNewArgc;
      g.argv = zNewArgv;
    }
    zCmdName = g.argv[1];
  }
#ifndef _WIN32
  /* There is a bug in stunnel4 in which it sometimes starts up client
  ** processes without first opening file descriptor 2 (standard error).