Fossil

Diff
Login

Differences From Artifact [37d57a5880]:

To Artifact [b95cbf4aff]:


607
608
609
610
611
612
613
614
615
616

617
618

619
620
621
622
623

624
625
626
627
628
629
630
void help_page(void){
    const char * zCmd = P("cmd");
    
    style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
    if( zCmd ){
      int rc, idx;

      @ <h1>%s(zCmd)</h1>
      rc = name_search(zCmd, aCommand, count(aCommand), &idx);
      if( rc==1 ){

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

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


        zSrc = (char*)aCmdHelp[idx];
        if( zSrc==0 || *zSrc==0 ){
          @ no help available for the %s(aCommand[idx].zName) command
        }else{
          len = strlen(zSrc);
          zDest = malloc(len+1);
          for(src=dest=0;zSrc[src];){







<


>


>





>







607
608
609
610
611
612
613

614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
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 ){
          @ no help available for the %s(aCommand[idx].zName) command
        }else{
          len = strlen(zSrc);
          zDest = malloc(len+1);
          for(src=dest=0;zSrc[src];){