Fossil

Check-in [d6e69d6a]
Login

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 | SQL archive
Timelines: family | ancestors | descendants | both | wolfgangHelpCmd
Files: files | file ages | folders
SHA1: d6e69d6a188bf9e73ace115364ffbd8e1b6e5631
User & Date: wolfgang 2010-10-08 12:56:24
Context
2010-10-08
13:06
merge from trunk check-in: ff6760ba user: wolfgang tags: wolfgangHelpCmd
12:56
corrected layout for wrong calls to help web page check-in: d6e69d6a user: wolfgang tags: wolfgangHelpCmd
12:42
help page uses detected command, not the given input parameter as header check-in: 9017bde2 user: wolfgang tags: wolfgangHelpCmd
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

   604    604   ** WEBPAGE: help
   605    605   ** URL: /help?cmd=CMD
   606    606   */
   607    607   void help_page(void){
   608    608       const char * zCmd = P("cmd");
   609    609       
   610    610       style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:"");
   611         -    if( zCmd ){
          611  +    if( zCmd  && zCmd[0] ){
   612    612         int rc, idx;
   613    613   
   614    614         rc = name_search(zCmd, aCommand, count(aCommand), &idx);
   615    615         if( rc==1 ){
   616         -        @ <h1>%s(zCmd)</h1>
   617         -        @ unknown command: %s(zCmd)
          616  +        @ <h1>unknown command: %s(zCmd)</h1>
   618    617         }else if( rc==2 ){
   619         -        @ <h1>%s(zCmd)</h1>
   620         -        @ ambiguous command prefix: %s(zCmd)
          618  +        @ <h1>ambiguous command prefix: %s(zCmd)</h1>
   621    619         }else{
   622    620           char *zSrc, *zDest;
   623    621           int src,dest,len;
   624    622   
   625    623           @ <h1>%s(aCommand[idx].zName)</h1>
   626    624           zSrc = (char*)aCmdHelp[idx];
   627    625           if( zSrc==0 || *zSrc==0 ){
................................................................................
   660    658                 zDest[dest++]='=';
   661    659                 start = src+1;
   662    660                 for( src=start; zSrc[src] && zSrc[src]!='<'; ){
   663    661                   zDest[dest++]=zSrc[src++]; /* command name */
   664    662                 }
   665    663                 zDest[dest++]='"';
   666    664                 zDest[dest++]='>';
          665  +              zDest[dest++]='"';
   667    666                 for( src=start; zSrc[src] && zSrc[src]!='<'; ){
   668    667                   zDest[dest++]=zSrc[src++]; /* command name */
   669    668                 }
          669  +              zDest[dest++]='"';
   670    670               }else{
   671    671                 zDest[dest++] = zSrc[src++];
   672    672               }
   673    673             }
   674    674             zDest[dest] = 0;
   675    675             @ <pre>%s(zDest)</pre>
   676    676             free(zDest);
          677  +          @ <hr>additional information may be found in the web documentation:
          678  +          @ <a href="http://www.fossil-scm.org/fossil/doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
          679  +          @ cmd_%s(aCommand[idx].zName)</a>, 
   677    680           }
   678    681         }
   679         -      @ <hr>additional information may be found in the web documentation:
   680         -      @ <a href="http://www.fossil-scm.org/fossil/doc/tip/www/cmd_%s(aCommand[idx].zName).wiki">
   681         -      @ cmd_%s(aCommand[idx].zName)</a>, see also the list of
          682  +      @ see also the list of
   682    683         @ <a href="help">available commands</a> in fossil
   683    684         @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC
   684    685       }else{
   685    686         int nCol, nRow, i, tests, cnt;
   686    687   
   687    688         for( i=0,tests=0; i<count(aCommand); i++){
   688    689           if( strncmp(aCommand[i].zName,"test",4)==0 ) tests++;