Fossil

Check-in [d6e69d6a18]
Login

Check-in [d6e69d6a18]

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

Overview
Comment:corrected layout for wrong calls to help web page
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | wolfgangHelpCmd
Files: files | file ages | folders
SHA1: d6e69d6a188bf9e73ace115364ffbd8e1b6e5631
User & Date: wolfgang 2010-10-08 12:56:24.000
Context
2010-10-08
13:06
merge from trunk ... (check-in: ff6760ba09 user: wolfgang tags: wolfgangHelpCmd)
12:56
corrected layout for wrong calls to help web page ... (check-in: d6e69d6a18 user: wolfgang tags: wolfgangHelpCmd)
12:42
help page uses detected command, not the given input parameter as header ... (check-in: 9017bde28f user: wolfgang tags: wolfgangHelpCmd)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
** WEBPAGE: help
** URL: /help?cmd=CMD
*/
void help_page(void){
    const char * zCmd = P("cmd");
    
    style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
    if( zCmd ){
      int rc, idx;

      rc = name_search(zCmd, aCommand, count(aCommand), &idx);
      if( rc==1 ){
        @ <h1>%s(zCmd)</h1>
        @ unknown command: %s(zCmd)
      }else if( rc==2 ){
        @ <h1>%s(zCmd)</h1>
        @ ambiguous command prefix: %s(zCmd)
      }else{
        char *zSrc, *zDest;
        int src,dest,len;

        @ <h1>%s(aCommand[idx].zName)</h1>
        zSrc = (char*)aCmdHelp[idx];
        if( zSrc==0 || *zSrc==0 ){







|




<
|

<
|







604
605
606
607
608
609
610
611
612
613
614
615

616
617

618
619
620
621
622
623
624
625
** WEBPAGE: help
** URL: /help?cmd=CMD
*/
void help_page(void){
    const char * zCmd = P("cmd");
    
    style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
    if( zCmd  && zCmd[0] ){
      int rc, idx;

      rc = name_search(zCmd, aCommand, count(aCommand), &idx);
      if( rc==1 ){

        @ <h1>unknown command: %s(zCmd)</h1>
      }else if( rc==2 ){

        @ <h1>ambiguous command prefix: %s(zCmd)</h1>
      }else{
        char *zSrc, *zDest;
        int src,dest,len;

        @ <h1>%s(aCommand[idx].zName)</h1>
        zSrc = (char*)aCmdHelp[idx];
        if( zSrc==0 || *zSrc==0 ){
660
661
662
663
664
665
666

667
668
669

670
671
672
673
674
675
676
677
678
679
680
681



682
683
684
685
686
687
688
              zDest[dest++]='=';
              start = src+1;
              for( src=start; zSrc[src] && zSrc[src]!='<'; ){
                zDest[dest++]=zSrc[src++]; /* command name */
              }
              zDest[dest++]='"';
              zDest[dest++]='>';

              for( src=start; zSrc[src] && zSrc[src]!='<'; ){
                zDest[dest++]=zSrc[src++]; /* command name */
              }

            }else{
              zDest[dest++] = zSrc[src++];
            }
          }
          zDest[dest] = 0;
          @ <pre>%s(zDest)</pre>
          free(zDest);
        }
      }
      @ <hr>additional information may be found in the web documentation:
      @ <a href="http://www.fossil-scm.org/fossil/doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
      @ cmd_%s(aCommand[idx].zName)</a>, see also the list of



      @ <a href="help">available commands</a> in fossil
      @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
    }else{
      int nCol, nRow, i, tests, cnt;

      for( i=0,tests=0; i<count(aCommand); i++){
        if( strncmp(aCommand[i].zName,"test",4)==0 ) tests++;







>



>







<
<
|
|
|
>
>
>







658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676


677
678
679
680
681
682
683
684
685
686
687
688
689
              zDest[dest++]='=';
              start = src+1;
              for( src=start; zSrc[src] && zSrc[src]!='<'; ){
                zDest[dest++]=zSrc[src++]; /* command name */
              }
              zDest[dest++]='"';
              zDest[dest++]='>';
              zDest[dest++]='"';
              for( src=start; zSrc[src] && zSrc[src]!='<'; ){
                zDest[dest++]=zSrc[src++]; /* command name */
              }
              zDest[dest++]='"';
            }else{
              zDest[dest++] = zSrc[src++];
            }
          }
          zDest[dest] = 0;
          @ <pre>%s(zDest)</pre>
          free(zDest);


          @ <hr>additional information may be found in the web documentation:
          @ <a href="http://www.fossil-scm.org/fossil/doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
          @ cmd_%s(aCommand[idx].zName)</a>, 
        }
      }
      @ see also the list of
      @ <a href="help">available commands</a> in fossil
      @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
    }else{
      int nCol, nRow, i, tests, cnt;

      for( i=0,tests=0; i<count(aCommand); i++){
        if( strncmp(aCommand[i].zName,"test",4)==0 ) tests++;