Fossil SCM
Modified /help page to show help text for /pages. Only pages with help text get hyperlinks.
Commit
affccaa822793b11fbb05a11e3d6ba77065f8788
Parent
e788795bbfd0db1…
1 file changed
+34
-2
+34
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1075,17 +1075,17 @@ | ||
| 1075 | 1075 | |
| 1076 | 1076 | @ <h1>Available commands:</h1> |
| 1077 | 1077 | @ <table border="0"><tr> |
| 1078 | 1078 | for(i=j=0; i<count(aCommand); i++){ |
| 1079 | 1079 | const char *z = aCommand[i].zName; |
| 1080 | - if( strncmp(z,"test",4)==0 ) continue; | |
| 1080 | + if( '/'==*z || strncmp(z,"test",4)==0 ) continue; | |
| 1081 | 1081 | j++; |
| 1082 | 1082 | } |
| 1083 | 1083 | n = (j+6)/7; |
| 1084 | 1084 | for(i=j=0; i<count(aCommand); i++){ |
| 1085 | 1085 | const char *z = aCommand[i].zName; |
| 1086 | - if( strncmp(z,"test",4)==0 ) continue; | |
| 1086 | + if( '/'==*z || strncmp(z,"test",4)==0 ) continue; | |
| 1087 | 1087 | if( j==0 ){ |
| 1088 | 1088 | @ <td valign="top"><ul> |
| 1089 | 1089 | } |
| 1090 | 1090 | @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a> |
| 1091 | 1091 | j++; |
| @@ -1096,10 +1096,42 @@ | ||
| 1096 | 1096 | } |
| 1097 | 1097 | if( j>0 ){ |
| 1098 | 1098 | @ </ul></td> |
| 1099 | 1099 | } |
| 1100 | 1100 | @ </tr></table> |
| 1101 | + | |
| 1102 | + @ <h1>Available pages:</h1> | |
| 1103 | + @ (Only pages with help text are linked.) | |
| 1104 | + @ <table border="0"><tr> | |
| 1105 | + for(i=j=0; i<count(aCommand); i++){ | |
| 1106 | + const char *z = aCommand[i].zName; | |
| 1107 | + if( '/'!=*z ) continue; | |
| 1108 | + j++; | |
| 1109 | + } | |
| 1110 | + n = (j+5)/6; | |
| 1111 | + for(i=j=0; i<count(aCommand); i++){ | |
| 1112 | + const char *z = aCommand[i].zName; | |
| 1113 | + if( '/'!=*z ) continue; | |
| 1114 | + if( j==0 ){ | |
| 1115 | + @ <td valign="top"><ul> | |
| 1116 | + } | |
| 1117 | + if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){ | |
| 1118 | + @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li> | |
| 1119 | + }else{ | |
| 1120 | + @ <li>%s(z)</li> | |
| 1121 | + } | |
| 1122 | + j++; | |
| 1123 | + if( j>=n ){ | |
| 1124 | + @ </ul></td> | |
| 1125 | + j = 0; | |
| 1126 | + } | |
| 1127 | + } | |
| 1128 | + if( j>0 ){ | |
| 1129 | + @ </ul></td> | |
| 1130 | + } | |
| 1131 | + @ </tr></table> | |
| 1132 | + | |
| 1101 | 1133 | } |
| 1102 | 1134 | style_footer(); |
| 1103 | 1135 | } |
| 1104 | 1136 | |
| 1105 | 1137 | /* |
| 1106 | 1138 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1075,17 +1075,17 @@ | |
| 1075 | |
| 1076 | @ <h1>Available commands:</h1> |
| 1077 | @ <table border="0"><tr> |
| 1078 | for(i=j=0; i<count(aCommand); i++){ |
| 1079 | const char *z = aCommand[i].zName; |
| 1080 | if( strncmp(z,"test",4)==0 ) continue; |
| 1081 | j++; |
| 1082 | } |
| 1083 | n = (j+6)/7; |
| 1084 | for(i=j=0; i<count(aCommand); i++){ |
| 1085 | const char *z = aCommand[i].zName; |
| 1086 | if( strncmp(z,"test",4)==0 ) continue; |
| 1087 | if( j==0 ){ |
| 1088 | @ <td valign="top"><ul> |
| 1089 | } |
| 1090 | @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a> |
| 1091 | j++; |
| @@ -1096,10 +1096,42 @@ | |
| 1096 | } |
| 1097 | if( j>0 ){ |
| 1098 | @ </ul></td> |
| 1099 | } |
| 1100 | @ </tr></table> |
| 1101 | } |
| 1102 | style_footer(); |
| 1103 | } |
| 1104 | |
| 1105 | /* |
| 1106 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1075,17 +1075,17 @@ | |
| 1075 | |
| 1076 | @ <h1>Available commands:</h1> |
| 1077 | @ <table border="0"><tr> |
| 1078 | for(i=j=0; i<count(aCommand); i++){ |
| 1079 | const char *z = aCommand[i].zName; |
| 1080 | if( '/'==*z || strncmp(z,"test",4)==0 ) continue; |
| 1081 | j++; |
| 1082 | } |
| 1083 | n = (j+6)/7; |
| 1084 | for(i=j=0; i<count(aCommand); i++){ |
| 1085 | const char *z = aCommand[i].zName; |
| 1086 | if( '/'==*z || strncmp(z,"test",4)==0 ) continue; |
| 1087 | if( j==0 ){ |
| 1088 | @ <td valign="top"><ul> |
| 1089 | } |
| 1090 | @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a> |
| 1091 | j++; |
| @@ -1096,10 +1096,42 @@ | |
| 1096 | } |
| 1097 | if( j>0 ){ |
| 1098 | @ </ul></td> |
| 1099 | } |
| 1100 | @ </tr></table> |
| 1101 | |
| 1102 | @ <h1>Available pages:</h1> |
| 1103 | @ (Only pages with help text are linked.) |
| 1104 | @ <table border="0"><tr> |
| 1105 | for(i=j=0; i<count(aCommand); i++){ |
| 1106 | const char *z = aCommand[i].zName; |
| 1107 | if( '/'!=*z ) continue; |
| 1108 | j++; |
| 1109 | } |
| 1110 | n = (j+5)/6; |
| 1111 | for(i=j=0; i<count(aCommand); i++){ |
| 1112 | const char *z = aCommand[i].zName; |
| 1113 | if( '/'!=*z ) continue; |
| 1114 | if( j==0 ){ |
| 1115 | @ <td valign="top"><ul> |
| 1116 | } |
| 1117 | if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){ |
| 1118 | @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li> |
| 1119 | }else{ |
| 1120 | @ <li>%s(z)</li> |
| 1121 | } |
| 1122 | j++; |
| 1123 | if( j>=n ){ |
| 1124 | @ </ul></td> |
| 1125 | j = 0; |
| 1126 | } |
| 1127 | } |
| 1128 | if( j>0 ){ |
| 1129 | @ </ul></td> |
| 1130 | } |
| 1131 | @ </tr></table> |
| 1132 | |
| 1133 | } |
| 1134 | style_footer(); |
| 1135 | } |
| 1136 | |
| 1137 | /* |
| 1138 |