Fossil SCM

Refactor command and webpage name lookup. Move all associated logic out of main.c and into a new file named "dispatch.c". There is now a single const array of objects named "aCommand" that contains all command and webpage names together with their help text.

drh 2016-09-13 17:51 trunk
Commit e6aab1a437f2c950f90dfdb24889ecd256e8bbcf
--- a/src/dispatch.c
+++ b/src/dispatch.c
@@ -0,0 +1,105 @@
1
+*
2
+** Copyr12ex /*
3
+*20ex
4
+** Query parameters:/*
5
+** Copyr12ex /*
6
+*20exCopyr/*
7
+** Copyr12ex /*
8
+*20exCopyropyr * Copyr12ex /*
9
+*20exropyr *
10
+** s=PATTERN Sea Copyr12ex /*
11
+*20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
12
+ #define CMDFLAG_PROPAGATES /CONST CONFIG DATA COOKIE DYNAMIC 0x10000 /* EETAG 0x1f000 TO_ETAG(X) ((X)>>12)
13
+/0exropyr *
14
+** s=PATTERN Sea Copyr12ex /*
15
+*20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
16
+ #define CMDFLAG_PROPAGATES /*
17
+** Ctable border="0"><tr>
18
+ for(i=jj++;
19
+ }
20
+ / #define CMDFLAG_PROPAGATES /*
21
+** Ctable border="0"><tr>
22
+ for(i=jj++s or webpageFunction that implement or webpage CmdOrPage
23
+* * or CMDFLAG_ANY to look for either
24
+** flagif( lwr<MX_COMMAND-1+1 ){
25
+A** Copyr12ex /*
26
+*20exCo*
27
+** ClwrCOMMANDCOMMANDCOMMAND
28
+**WWW COMMAND\nn"
29
+ "Common COMMANDFLAG_PROPAGATES /CONST CONFIG DATA COOKIE DYNAMIC 0x10000 /* EETAG 0x1f000 TO_ETAG(X) ((X)>>12)
30
+/0exropyr *
31
+** s=PATTERN Sea Copyr12ex /*
32
+*20exCopyropyr0exCCopyropyr if( zPattern && *zPattern ){
33
+ #define CMDFLAG_PROPAGATES /*
34
+** Ctable(sizeof(aC /*
35
+** Ctable border="0"><tr>
36
+ for(ieCmdFlags; / #define CMDFLAG_PROPAGATES /*
37
+** Ctable bost","t
38
+** Copyr *
39
+** s=PATT1ST_TIER 0xopyropyr * Copyr12ex /*
40
+*20exropyr *
41
+** sATTERN Sea Copyr12ex /*
42
+*20exCopyropyr0expyr12ex /*
43
+*20ex
44
+** Quh(pCmd->ex /*
45
+*20ex
46
+** Quh(pCmd->ex /*
47
+*20ex
48
+** Quh(pCmd->zName) command
49
+ \n\n", md->zName/ #define CMDF border="0"><tr>
50
+ forters:/*
51
+** CopyrANY 0x0exCopyropyr if( zPattern && *G_PROPAGATES /CONST CONFIG DATA COOK*
52
+** Copyr12ex /*
53
+*20ex
54
+** Query parameters:/*
55
+** Copyr12ex /*
56
+*20exCopyr/*
57
+** Copyr12ex /*
58
+*20exCopyropyr * Copyr12ex /*
59
+*20exropyr *
60
+** s=PATTERN Sea Copyr12ex /*
61
+*20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
62
+ #define CMDFLAG_PROPAGATES }
63
+---\n");har *z, *s, *d;
64
+ z = (char*)pCmd->zHelp;
65
+ if( zz=s=d=mprintf("%s",z);
66
+
67
+** Copyr12ex /*
68
+*20ex
69
+** Queuery parametersapproximate slightly
70
+**end might*
71
+** Copyr12ex /*
72
+*20e
73
+*2rder="0"><tr>
74
+ for(i=jj++s or webpageFunction that implement or webpage CmdOrPage
75
+* * or CMDFLAG_ANY to look for either
76
+** flagif( lwr<MX_COMMAND-1 implement
77
+**OMMANDCOMMANDCOMMAND
78
+**WWW COMMAND\nn"
79
+ "Common COMMANDFLAG_PROPAGATES /CONST CONFIG DATA COOKIE DYNAMIC 0x10000 /* EETAG 0x1f000 TO_ETAG(X) ((X)>>12)
80
+/0exropyr *
81
+** s=PATTERN Sea Copyr12ex /*
82
+*20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
83
+ #define CMDFLAG_PROPAGATES /*
84
+** Ctable(sizeof(aC /*
85
+** Ctable border="0"><tr>
86
+ for(ieCmdFlags; / #define CMDFLAG_PROPAGATES /*
87
+** Ctable bost","t
88
+** Copyr *
89
+** s=PATT1ST_TIER 0xopyropyr * Copyr12ex /*
90
+*20exropyr *
91
+** sATTERN Sea Copyr12ex /*
92
+*20exCopyropyr0expyr12ex /*
93
+*20ex
94
+** Quh(pCmd->ex /*
95
+*20ex
96
+** Quh(pCm
97
+*20ex
98
+** Quh(pCmd
99
+*ppCmdATES /CONST CONFIG DATA COOK*
100
+** Copyr12ex /*
101
+*20ex
102
+** Query parameters:#if 0
103
+ if( (eType&CMDFLAG_WEBPAGE)==0 ) lwr = FOSSIL_FIRST_CMD;
104
+ if( (eType&CMDFLAG_COMMAND)==0 ) upr = FOSSIL_FIRST_CMD-1;
105
+#endif
--- a/src/dispatch.c
+++ b/src/dispatch.c
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/src/dispatch.c
+++ b/src/dispatch.c
@@ -0,0 +1,105 @@
1 *
2 ** Copyr12ex /*
3 *20ex
4 ** Query parameters:/*
5 ** Copyr12ex /*
6 *20exCopyr/*
7 ** Copyr12ex /*
8 *20exCopyropyr * Copyr12ex /*
9 *20exropyr *
10 ** s=PATTERN Sea Copyr12ex /*
11 *20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
12 #define CMDFLAG_PROPAGATES /CONST CONFIG DATA COOKIE DYNAMIC 0x10000 /* EETAG 0x1f000 TO_ETAG(X) ((X)>>12)
13 /0exropyr *
14 ** s=PATTERN Sea Copyr12ex /*
15 *20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
16 #define CMDFLAG_PROPAGATES /*
17 ** Ctable border="0"><tr>
18 for(i=jj++;
19 }
20 / #define CMDFLAG_PROPAGATES /*
21 ** Ctable border="0"><tr>
22 for(i=jj++s or webpageFunction that implement or webpage CmdOrPage
23 * * or CMDFLAG_ANY to look for either
24 ** flagif( lwr<MX_COMMAND-1+1 ){
25 A** Copyr12ex /*
26 *20exCo*
27 ** ClwrCOMMANDCOMMANDCOMMAND
28 **WWW COMMAND\nn"
29 "Common COMMANDFLAG_PROPAGATES /CONST CONFIG DATA COOKIE DYNAMIC 0x10000 /* EETAG 0x1f000 TO_ETAG(X) ((X)>>12)
30 /0exropyr *
31 ** s=PATTERN Sea Copyr12ex /*
32 *20exCopyropyr0exCCopyropyr if( zPattern && *zPattern ){
33 #define CMDFLAG_PROPAGATES /*
34 ** Ctable(sizeof(aC /*
35 ** Ctable border="0"><tr>
36 for(ieCmdFlags; / #define CMDFLAG_PROPAGATES /*
37 ** Ctable bost","t
38 ** Copyr *
39 ** s=PATT1ST_TIER 0xopyropyr * Copyr12ex /*
40 *20exropyr *
41 ** sATTERN Sea Copyr12ex /*
42 *20exCopyropyr0expyr12ex /*
43 *20ex
44 ** Quh(pCmd->ex /*
45 *20ex
46 ** Quh(pCmd->ex /*
47 *20ex
48 ** Quh(pCmd->zName) command
49 \n\n", md->zName/ #define CMDF border="0"><tr>
50 forters:/*
51 ** CopyrANY 0x0exCopyropyr if( zPattern && *G_PROPAGATES /CONST CONFIG DATA COOK*
52 ** Copyr12ex /*
53 *20ex
54 ** Query parameters:/*
55 ** Copyr12ex /*
56 *20exCopyr/*
57 ** Copyr12ex /*
58 *20exCopyropyr * Copyr12ex /*
59 *20exropyr *
60 ** s=PATTERN Sea Copyr12ex /*
61 *20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
62 #define CMDFLAG_PROPAGATES }
63 ---\n");har *z, *s, *d;
64 z = (char*)pCmd->zHelp;
65 if( zz=s=d=mprintf("%s",z);
66
67 ** Copyr12ex /*
68 *20ex
69 ** Queuery parametersapproximate slightly
70 **end might*
71 ** Copyr12ex /*
72 *20e
73 *2rder="0"><tr>
74 for(i=jj++s or webpageFunction that implement or webpage CmdOrPage
75 * * or CMDFLAG_ANY to look for either
76 ** flagif( lwr<MX_COMMAND-1 implement
77 **OMMANDCOMMANDCOMMAND
78 **WWW COMMAND\nn"
79 "Common COMMANDFLAG_PROPAGATES /CONST CONFIG DATA COOKIE DYNAMIC 0x10000 /* EETAG 0x1f000 TO_ETAG(X) ((X)>>12)
80 /0exropyr *
81 ** s=PATTERN Sea Copyr12ex /*
82 *20exCopyropyr0exCopyropyr if( zPattern && *zPattern ){
83 #define CMDFLAG_PROPAGATES /*
84 ** Ctable(sizeof(aC /*
85 ** Ctable border="0"><tr>
86 for(ieCmdFlags; / #define CMDFLAG_PROPAGATES /*
87 ** Ctable bost","t
88 ** Copyr *
89 ** s=PATT1ST_TIER 0xopyropyr * Copyr12ex /*
90 *20exropyr *
91 ** sATTERN Sea Copyr12ex /*
92 *20exCopyropyr0expyr12ex /*
93 *20ex
94 ** Quh(pCmd->ex /*
95 *20ex
96 ** Quh(pCm
97 *20ex
98 ** Quh(pCmd
99 *ppCmdATES /CONST CONFIG DATA COOK*
100 ** Copyr12ex /*
101 *20ex
102 ** Query parameters:#if 0
103 if( (eType&CMDFLAG_WEBPAGE)==0 ) lwr = FOSSIL_FIRST_CMD;
104 if( (eType&CMDFLAG_COMMAND)==0 ) upr = FOSSIL_FIRST_CMD-1;
105 #endif
+14 -414
--- src/main.c
+++ src/main.c
@@ -294,65 +294,10 @@
294294
295295
#endif
296296
297297
Global g;
298298
299
-/*
300
-** The table of web pages supported by this application is generated
301
-** automatically by the "mkindex" program and written into a file
302
-** named "page_index.h". We include that file here to get access
303
-** to the table.
304
-*/
305
-#include "page_index.h"
306
-
307
-/*
308
-** Search for a function whose name matches zName. Write a pointer to
309
-** that function into *pxFunc and return 0. If no match is found,
310
-** return 1. If the command is ambiguous return 2;
311
-**
312
-** The NameMap structure and the tables we are searching against are
313
-** defined in the page_index.h header file which is automatically
314
-** generated by mkindex.c program.
315
-*/
316
-static int name_search(
317
- const char *zName, /* The name we are looking for */
318
- const NameMap *aMap, /* Search in this array */
319
- int nMap, /* Number of slots in aMap[] */
320
- int iBegin, /* Lower bound on the array search */
321
- int *pIndex /* OUT: The index in aMap[] of the match */
322
-){
323
- int upr, lwr, cnt, m, i;
324
- int n = strlen(zName);
325
- lwr = iBegin;
326
- upr = nMap-1;
327
- while( lwr<=upr ){
328
- int mid, c;
329
- mid = (upr+lwr)/2;
330
- c = fossil_strcmp(zName, aMap[mid].zName);
331
- if( c==0 ){
332
- *pIndex = mid;
333
- return 0;
334
- }else if( c<0 ){
335
- upr = mid - 1;
336
- }else{
337
- lwr = mid + 1;
338
- }
339
- }
340
- for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){
341
- if( i<iBegin ) continue;
342
- if( strncmp(zName, aMap[i].zName, n)==0 ){
343
- m = i;
344
- cnt++;
345
- }
346
- }
347
- if( cnt==1 ){
348
- *pIndex = m;
349
- return 0;
350
- }
351
- return 1+(cnt>1);
352
-}
353
-
354299
/*
355300
** atexit() handler which frees up "some" of the resources
356301
** used by fossil.
357302
*/
358303
static void fossil_atexit(void) {
@@ -590,11 +535,11 @@
590535
#endif
591536
int main(int argc, char **argv)
592537
#endif
593538
{
594539
const char *zCmdName = "unknown";
595
- int idx;
540
+ const CmdOrPage *pCmd = 0;
596541
int rc;
597542
if( sqlite3_libversion_number()<3014000 ){
598543
fossil_fatal("Unsuitable SQLite version %s, must be at least 3.14.0",
599544
sqlite3_libversion());
600545
}
@@ -734,11 +679,11 @@
734679
fossil_fatal("file descriptor 2 is not open. (fd=%d, errno=%d)",
735680
fd, x);
736681
}
737682
}
738683
#endif
739
- rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
684
+ rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
740685
if( rc==1 ){
741686
#ifdef FOSSIL_ENABLE_TH1_HOOKS
742687
if( !g.isHTTP && !g.fNoThHook ){
743688
rc = Th_CommandHook(zCmdName, 0);
744689
}else{
@@ -746,11 +691,11 @@
746691
}
747692
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
748693
if( rc==TH_OK || rc==TH_RETURN ){
749694
#endif
750695
fossil_fatal("%s: unknown command: %s\n"
751
- "%s: use \"help\" for more information\n",
696
+ "%s: use \"help\" for more information",
752697
g.argv[0], zCmdName, g.argv[0]);
753698
#ifdef FOSSIL_ENABLE_TH1_HOOKS
754699
}
755700
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
756701
Th_CommandNotify(zCmdName, 0);
@@ -757,19 +702,13 @@
757702
}
758703
}
759704
fossil_exit(0);
760705
#endif
761706
}else if( rc==2 ){
762
- int i, n;
763707
Blob couldbe;
764
- blob_zero(&couldbe);
765
- n = strlen(zCmdName);
766
- for(i=0; i<count(aCommand); i++){
767
- if( memcmp(zCmdName, aCommand[i].zName, n)==0 ){
768
- blob_appendf(&couldbe, " %s", aCommand[i].zName);
769
- }
770
- }
708
+ blob_init(&couldbe,0,0);
709
+ dispatch_matching_names(zCmdName, &couldbe);
771710
fossil_print("%s: ambiguous command prefix: %s\n"
772711
"%s: could be any of:%s\n"
773712
"%s: use \"help\" for more information\n",
774713
g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
775714
fossil_exit(1);
@@ -792,22 +731,22 @@
792731
**
793732
** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
794733
** executed.
795734
*/
796735
if( !g.isHTTP && !g.fNoThHook ){
797
- rc = Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags);
736
+ rc = Th_CommandHook(pCmd->zName, pCmd->eCmdFlags);
798737
}else{
799738
rc = TH_OK;
800739
}
801740
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
802741
if( rc==TH_OK || rc==TH_RETURN ){
803742
#endif
804
- aCommand[idx].xFunc();
743
+ pCmd->xFunc();
805744
#ifdef FOSSIL_ENABLE_TH1_HOOKS
806745
}
807746
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
808
- Th_CommandNotify(aCommand[idx].zName, aCommand[idx].cmdFlags);
747
+ Th_CommandNotify(pCmd->zName, pCmd->eCmdFlags);
809748
}
810749
}
811750
#endif
812751
fossil_exit(0);
813752
/*NOT_REACHED*/
@@ -944,65 +883,10 @@
944883
}
945884
946885
/*
947886
** Print a list of words in multiple columns.
948887
*/
949
-static void multi_column_list(const char **azWord, int nWord){
950
- int i, j, len;
951
- int mxLen = 0;
952
- int nCol;
953
- int nRow;
954
- for(i=0; i<nWord; i++){
955
- len = strlen(azWord[i]);
956
- if( len>mxLen ) mxLen = len;
957
- }
958
- nCol = 80/(mxLen+2);
959
- if( nCol==0 ) nCol = 1;
960
- nRow = (nWord + nCol - 1)/nCol;
961
- for(i=0; i<nRow; i++){
962
- const char *zSpacer = "";
963
- for(j=i; j<nWord; j+=nRow){
964
- fossil_print("%s%-*s", zSpacer, mxLen, azWord[j]);
965
- zSpacer = " ";
966
- }
967
- fossil_print("\n");
968
- }
969
-}
970
-
971
-/*
972
-** List of commands starting with zPrefix, or all commands if zPrefix is NULL.
973
-*/
974
-static void command_list(const char *zPrefix, int cmdMask){
975
- int i, nCmd;
976
- int nPrefix = zPrefix ? strlen(zPrefix) : 0;
977
- const char *aCmd[count(aCommand)];
978
- for(i=nCmd=0; i<count(aCommand); i++){
979
- const char *z = aCommand[i].zName;
980
- if( (aCommand[i].cmdFlags & cmdMask)==0 ) continue;
981
- if( zPrefix && memcmp(zPrefix, z, nPrefix)!=0 ) continue;
982
- aCmd[nCmd++] = aCommand[i].zName;
983
- }
984
- multi_column_list(aCmd, nCmd);
985
-}
986
-
987
-/*
988
-** COMMAND: test-list-webpage
989
-**
990
-** List all web pages.
991
-*/
992
-void cmd_test_webpage_list(void){
993
- int i, nCmd;
994
- const char *aCmd[count(aCommand)];
995
- for(i=nCmd=0; i<count(aCommand); i++){
996
- if(0x08 & aCommand[i].cmdFlags){
997
- aCmd[nCmd++] = aWebpage[i].zName;
998
- }
999
- }
1000
- assert(nCmd && "page list is empty?");
1001
- multi_column_list(aCmd, nCmd);
1002
-}
1003
-
1004888
1005889
1006890
/*
1007891
** This function returns a human readable version string.
1008892
*/
@@ -1143,294 +1027,10 @@
11431027
@ </pre></blockquote>
11441028
style_footer();
11451029
}
11461030
11471031
1148
-/*
1149
-** COMMAND: help
1150
-**
1151
-** Usage: %fossil help COMMAND
1152
-** or: %fossil COMMAND --help
1153
-**
1154
-** Display information on how to use COMMAND. To display a list of
1155
-** available commands use one of:
1156
-**
1157
-** %fossil help Show common commands
1158
-** %fossil help -a|--all Show both common and auxiliary commands
1159
-** %fossil help -t|--test Show test commands only
1160
-** %fossil help -x|--aux Show auxiliary commands only
1161
-** %fossil help -w|--www Show list of WWW pages
1162
-*/
1163
-void help_cmd(void){
1164
- int rc, idx, isPage = 0;
1165
- const char *z;
1166
- const char *zCmdOrPage;
1167
- const char *zCmdOrPagePlural;
1168
- if( g.argc<3 ){
1169
- z = g.argv[0];
1170
- fossil_print(
1171
- "Usage: %s help COMMAND\n"
1172
- "Common COMMANDs: (use \"%s help -a|--all\" for a complete list)\n",
1173
- z, z);
1174
- command_list(0, CMDFLAG_1ST_TIER);
1175
- version_cmd();
1176
- return;
1177
- }
1178
- if( find_option("all","a",0) ){
1179
- command_list(0, CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER);
1180
- return;
1181
- }
1182
- else if( find_option("www","w",0) ){
1183
- command_list(0, CMDFLAG_WEBPAGE);
1184
- return;
1185
- }
1186
- else if( find_option("aux","x",0) ){
1187
- command_list(0, CMDFLAG_2ND_TIER);
1188
- return;
1189
- }
1190
- else if( find_option("test","t",0) ){
1191
- command_list(0, CMDFLAG_TEST);
1192
- return;
1193
- }
1194
- isPage = ('/' == *g.argv[2]) ? 1 : 0;
1195
- if(isPage){
1196
- zCmdOrPage = "page";
1197
- zCmdOrPagePlural = "pages";
1198
- }else{
1199
- zCmdOrPage = "command";
1200
- zCmdOrPagePlural = "commands";
1201
- }
1202
- rc = name_search(g.argv[2], aCommand, count(aCommand), 0, &idx);
1203
- if( rc==1 ){
1204
- fossil_print("unknown %s: %s\nAvailable %s:\n",
1205
- zCmdOrPage, g.argv[2], zCmdOrPagePlural);
1206
- command_list(0, isPage ? CMDFLAG_WEBPAGE : (0xff & ~CMDFLAG_WEBPAGE));
1207
- fossil_exit(1);
1208
- }else if( rc==2 ){
1209
- fossil_print("ambiguous %s prefix: %s\nMatching %s:\n",
1210
- zCmdOrPage, g.argv[2], zCmdOrPagePlural);
1211
- command_list(g.argv[2], 0xff);
1212
- fossil_exit(1);
1213
- }
1214
- z = aCmdHelp[idx].zText;
1215
- if( z==0 ){
1216
- fossil_fatal("no help available for the %s %s",
1217
- aCommand[idx].zName, zCmdOrPage);
1218
- }
1219
- while( *z ){
1220
- if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
1221
- fossil_print("%s", g.argv[0]);
1222
- z += 7;
1223
- }else{
1224
- putchar(*z);
1225
- z++;
1226
- }
1227
- }
1228
- putchar('\n');
1229
-}
1230
-
1231
-/*
1232
-** COMMAND: test-all-help
1233
-**
1234
-** Usage: %fossil test-all-help ?OPTIONS?
1235
-**
1236
-** Show help text for commands and pages. Useful for proof-reading.
1237
-** Defaults to just the CLI commands. Specify --www to see only the
1238
-** web pages, or --everything to see both commands and pages.
1239
-**
1240
-** Options:
1241
-** -e|--everything Show all commands and pages.
1242
-** -t|--test Include test- commands
1243
-** -w|--www Show WWW pages.
1244
-*/
1245
-void test_all_help_cmd(void){
1246
- int i;
1247
- int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER;
1248
-
1249
- if( find_option("www","w",0) ){
1250
- mask = CMDFLAG_WEBPAGE;
1251
- }
1252
- if( find_option("everything","e",0) ){
1253
- mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE;
1254
- }
1255
- if( find_option("test","t",0) ){
1256
- mask |= CMDFLAG_TEST;
1257
- }
1258
- fossil_print("Help text for:\n");
1259
- if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n");
1260
- if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n");
1261
- if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n");
1262
- if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n");
1263
- fossil_print("---\n");
1264
- for(i=0; i<count(aCommand); i++){
1265
- if( (aCommand[i].cmdFlags & mask)==0 ) continue;
1266
- fossil_print("# %s\n", aCommand[i].zName);
1267
- fossil_print("%s\n\n", aCmdHelp[i].zText);
1268
- }
1269
- fossil_print("---\n");
1270
- version_cmd();
1271
-}
1272
-
1273
-/*
1274
-** WEBPAGE: help
1275
-** URL: /help?name=CMD
1276
-**
1277
-** Show the built-in help text for CMD. CMD can be a command-line interface
1278
-** command or a page name from the web interface.
1279
-*/
1280
-void help_page(void){
1281
- const char *zCmd = P("cmd");
1282
-
1283
- if( zCmd==0 ) zCmd = P("name");
1284
- style_header("Command-line Help");
1285
- if( zCmd ){
1286
- int rc, idx;
1287
- char *z, *s, *d;
1288
- style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop);
1289
- if( *zCmd=='/' ){
1290
- /* Some of the webpages require query parameters in order to work.
1291
- ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
1292
- @ <h1>The "%s(zCmd)" page:</h1>
1293
- }else{
1294
- @ <h1>The "%s(zCmd)" command:</h1>
1295
- }
1296
- rc = name_search(zCmd, aCommand, count(aCommand), 0, &idx);
1297
- if( rc==1 ){
1298
- @ unknown command: %s(zCmd)
1299
- }else if( rc==2 ){
1300
- @ ambiguous command prefix: %s(zCmd)
1301
- }else{
1302
- z = (char*)aCmdHelp[idx].zText;
1303
- if( z==0 ){
1304
- @ no help available for the %s(aCommand[idx].zName) command
1305
- }else{
1306
- z=s=d=mprintf("%s",z);
1307
- while( *s ){
1308
- if( *s=='%' && strncmp(s, "%fossil", 7)==0 ){
1309
- s++;
1310
- }else{
1311
- *d++ = *s++;
1312
- }
1313
- }
1314
- *d = 0;
1315
- @ <blockquote><pre>
1316
- @ %h(z)
1317
- @ </pre></blockquote>
1318
- fossil_free(z);
1319
- }
1320
- }
1321
- }else{
1322
- int i, j, n;
1323
-
1324
- @ <h1>Available commands:</h1>
1325
- @ <table border="0"><tr>
1326
- for(i=j=0; i<count(aCommand); i++){
1327
- const char *z = aCommand[i].zName;
1328
- if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
1329
- j++;
1330
- }
1331
- n = (j+6)/7;
1332
- for(i=j=0; i<count(aCommand); i++){
1333
- const char *z = aCommand[i].zName;
1334
- if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
1335
- if( j==0 ){
1336
- @ <td valign="top"><ul>
1337
- }
1338
- @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
1339
- j++;
1340
- if( j>=n ){
1341
- @ </ul></td>
1342
- j = 0;
1343
- }
1344
- }
1345
- if( j>0 ){
1346
- @ </ul></td>
1347
- }
1348
- @ </tr></table>
1349
-
1350
- @ <h1>Available web UI pages:</h1>
1351
- @ <table border="0"><tr>
1352
- for(i=j=0; i<count(aCommand); i++){
1353
- const char *z = aCommand[i].zName;
1354
- if( '/'!=*z ) continue;
1355
- j++;
1356
- }
1357
- n = (j+4)/5;
1358
- for(i=j=0; i<count(aCommand); i++){
1359
- const char *z = aCommand[i].zName;
1360
- if( '/'!=*z ) continue;
1361
- if( j==0 ){
1362
- @ <td valign="top"><ul>
1363
- }
1364
- if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1365
- @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li>
1366
- }else{
1367
- @ <li>%s(z+1)</li>
1368
- }
1369
- j++;
1370
- if( j>=n ){
1371
- @ </ul></td>
1372
- j = 0;
1373
- }
1374
- }
1375
- if( j>0 ){
1376
- @ </ul></td>
1377
- }
1378
- @ </tr></table>
1379
-
1380
- @ <h1>Unsupported commands:</h1>
1381
- @ <table border="0"><tr>
1382
- for(i=j=0; i<count(aCommand); i++){
1383
- const char *z = aCommand[i].zName;
1384
- if( strncmp(z,"test",4)!=0 ) continue;
1385
- j++;
1386
- }
1387
- n = (j+3)/4;
1388
- for(i=j=0; i<count(aCommand); i++){
1389
- const char *z = aCommand[i].zName;
1390
- if( strncmp(z,"test",4)!=0 ) continue;
1391
- if( j==0 ){
1392
- @ <td valign="top"><ul>
1393
- }
1394
- if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1395
- @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
1396
- }else{
1397
- @ <li>%s(z)</li>
1398
- }
1399
- j++;
1400
- if( j>=n ){
1401
- @ </ul></td>
1402
- j = 0;
1403
- }
1404
- }
1405
- if( j>0 ){
1406
- @ </ul></td>
1407
- }
1408
- @ </tr></table>
1409
-
1410
- }
1411
- style_footer();
1412
-}
1413
-
1414
-/*
1415
-** WEBPAGE: test-all-help
1416
-**
1417
-** Show all help text on a single page. Useful for proof-reading.
1418
-*/
1419
-void test_all_help_page(void){
1420
- int i;
1421
- style_header("Testpage: All Help Text");
1422
- for(i=0; i<count(aCommand); i++){
1423
- if( memcmp(aCommand[i].zName, "test", 4)==0 ) continue;
1424
- @ <h2>%s(aCommand[i].zName):</h2>
1425
- @ <blockquote><pre>
1426
- @ %h(aCmdHelp[i].zText)
1427
- @ </pre></blockquote>
1428
- }
1429
- style_footer();
1430
-}
1431
-
14321032
/*
14331033
** Set the g.zBaseURL value to the full URL for the toplevel of
14341034
** the fossil tree. Set g.zTop to g.zBaseURL without the
14351035
** leading "http://" and the host and port.
14361036
**
@@ -1646,12 +1246,12 @@
16461246
int allowRepoList /* Send repo list for "/" URL */
16471247
){
16481248
const char *zPathInfo;
16491249
const char *zDirPathInfo;
16501250
char *zPath = NULL;
1651
- int idx;
16521251
int i;
1252
+ const CmdOrPage *pCmd = 0;
16531253
16541254
/* Handle universal query parameters */
16551255
if( PB("utc") ){
16561256
g.fTimeFormat = 1;
16571257
}else if( PB("localtime") ){
@@ -1886,11 +1486,11 @@
18861486
}
18871487
18881488
/* Locate the method specified by the path and execute the function
18891489
** that implements that method.
18901490
*/
1891
- if( name_search(g.zPath, aWebpage, count(aWebpage), 0, &idx) ){
1491
+ if( dispatch_name_search(g.zPath-1, CMDFLAG_WEBPAGE, &pCmd) ){
18921492
#ifdef FOSSIL_ENABLE_JSON
18931493
if(g.json.isJsonMode){
18941494
json_err(FSL_JSON_E_RESOURCE_NOT_FOUND,NULL,0);
18951495
}else
18961496
#endif
@@ -1914,11 +1514,11 @@
19141514
Th_WebpageNotify(g.zPath, 0);
19151515
}
19161516
}
19171517
#endif
19181518
}
1919
- }else if( aWebpage[idx].xFunc!=page_xfer && db_schema_is_outofdate() ){
1519
+ }else if( pCmd->xFunc!=page_xfer && db_schema_is_outofdate() ){
19201520
#ifdef FOSSIL_ENABLE_JSON
19211521
if(g.json.isJsonMode){
19221522
json_err(FSL_JSON_E_DB_NEEDS_REBUILD,NULL,0);
19231523
}else
19241524
#endif
@@ -1946,22 +1546,22 @@
19461546
** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
19471547
** executed.
19481548
*/
19491549
int rc;
19501550
if( !g.fNoThHook ){
1951
- rc = Th_WebpageHook(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
1551
+ rc = Th_WebpageHook(pCmd->zName+1, pCmd->eCmdFlags);
19521552
}else{
19531553
rc = TH_OK;
19541554
}
19551555
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
19561556
if( rc==TH_OK || rc==TH_RETURN ){
19571557
#endif
1958
- aWebpage[idx].xFunc();
1558
+ pCmd->xFunc();
19591559
#ifdef FOSSIL_ENABLE_TH1_HOOKS
19601560
}
19611561
if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1962
- Th_WebpageNotify(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
1562
+ Th_WebpageNotify(pCmd->zName+1, pCmd->eCmdFlags);
19631563
}
19641564
}
19651565
#endif
19661566
}
19671567
19681568
--- src/main.c
+++ src/main.c
@@ -294,65 +294,10 @@
294
295 #endif
296
297 Global g;
298
299 /*
300 ** The table of web pages supported by this application is generated
301 ** automatically by the "mkindex" program and written into a file
302 ** named "page_index.h". We include that file here to get access
303 ** to the table.
304 */
305 #include "page_index.h"
306
307 /*
308 ** Search for a function whose name matches zName. Write a pointer to
309 ** that function into *pxFunc and return 0. If no match is found,
310 ** return 1. If the command is ambiguous return 2;
311 **
312 ** The NameMap structure and the tables we are searching against are
313 ** defined in the page_index.h header file which is automatically
314 ** generated by mkindex.c program.
315 */
316 static int name_search(
317 const char *zName, /* The name we are looking for */
318 const NameMap *aMap, /* Search in this array */
319 int nMap, /* Number of slots in aMap[] */
320 int iBegin, /* Lower bound on the array search */
321 int *pIndex /* OUT: The index in aMap[] of the match */
322 ){
323 int upr, lwr, cnt, m, i;
324 int n = strlen(zName);
325 lwr = iBegin;
326 upr = nMap-1;
327 while( lwr<=upr ){
328 int mid, c;
329 mid = (upr+lwr)/2;
330 c = fossil_strcmp(zName, aMap[mid].zName);
331 if( c==0 ){
332 *pIndex = mid;
333 return 0;
334 }else if( c<0 ){
335 upr = mid - 1;
336 }else{
337 lwr = mid + 1;
338 }
339 }
340 for(m=cnt=0, i=upr-2; cnt<2 && i<=upr+3 && i<nMap; i++){
341 if( i<iBegin ) continue;
342 if( strncmp(zName, aMap[i].zName, n)==0 ){
343 m = i;
344 cnt++;
345 }
346 }
347 if( cnt==1 ){
348 *pIndex = m;
349 return 0;
350 }
351 return 1+(cnt>1);
352 }
353
354 /*
355 ** atexit() handler which frees up "some" of the resources
356 ** used by fossil.
357 */
358 static void fossil_atexit(void) {
@@ -590,11 +535,11 @@
590 #endif
591 int main(int argc, char **argv)
592 #endif
593 {
594 const char *zCmdName = "unknown";
595 int idx;
596 int rc;
597 if( sqlite3_libversion_number()<3014000 ){
598 fossil_fatal("Unsuitable SQLite version %s, must be at least 3.14.0",
599 sqlite3_libversion());
600 }
@@ -734,11 +679,11 @@
734 fossil_fatal("file descriptor 2 is not open. (fd=%d, errno=%d)",
735 fd, x);
736 }
737 }
738 #endif
739 rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
740 if( rc==1 ){
741 #ifdef FOSSIL_ENABLE_TH1_HOOKS
742 if( !g.isHTTP && !g.fNoThHook ){
743 rc = Th_CommandHook(zCmdName, 0);
744 }else{
@@ -746,11 +691,11 @@
746 }
747 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
748 if( rc==TH_OK || rc==TH_RETURN ){
749 #endif
750 fossil_fatal("%s: unknown command: %s\n"
751 "%s: use \"help\" for more information\n",
752 g.argv[0], zCmdName, g.argv[0]);
753 #ifdef FOSSIL_ENABLE_TH1_HOOKS
754 }
755 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
756 Th_CommandNotify(zCmdName, 0);
@@ -757,19 +702,13 @@
757 }
758 }
759 fossil_exit(0);
760 #endif
761 }else if( rc==2 ){
762 int i, n;
763 Blob couldbe;
764 blob_zero(&couldbe);
765 n = strlen(zCmdName);
766 for(i=0; i<count(aCommand); i++){
767 if( memcmp(zCmdName, aCommand[i].zName, n)==0 ){
768 blob_appendf(&couldbe, " %s", aCommand[i].zName);
769 }
770 }
771 fossil_print("%s: ambiguous command prefix: %s\n"
772 "%s: could be any of:%s\n"
773 "%s: use \"help\" for more information\n",
774 g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
775 fossil_exit(1);
@@ -792,22 +731,22 @@
792 **
793 ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
794 ** executed.
795 */
796 if( !g.isHTTP && !g.fNoThHook ){
797 rc = Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags);
798 }else{
799 rc = TH_OK;
800 }
801 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
802 if( rc==TH_OK || rc==TH_RETURN ){
803 #endif
804 aCommand[idx].xFunc();
805 #ifdef FOSSIL_ENABLE_TH1_HOOKS
806 }
807 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
808 Th_CommandNotify(aCommand[idx].zName, aCommand[idx].cmdFlags);
809 }
810 }
811 #endif
812 fossil_exit(0);
813 /*NOT_REACHED*/
@@ -944,65 +883,10 @@
944 }
945
946 /*
947 ** Print a list of words in multiple columns.
948 */
949 static void multi_column_list(const char **azWord, int nWord){
950 int i, j, len;
951 int mxLen = 0;
952 int nCol;
953 int nRow;
954 for(i=0; i<nWord; i++){
955 len = strlen(azWord[i]);
956 if( len>mxLen ) mxLen = len;
957 }
958 nCol = 80/(mxLen+2);
959 if( nCol==0 ) nCol = 1;
960 nRow = (nWord + nCol - 1)/nCol;
961 for(i=0; i<nRow; i++){
962 const char *zSpacer = "";
963 for(j=i; j<nWord; j+=nRow){
964 fossil_print("%s%-*s", zSpacer, mxLen, azWord[j]);
965 zSpacer = " ";
966 }
967 fossil_print("\n");
968 }
969 }
970
971 /*
972 ** List of commands starting with zPrefix, or all commands if zPrefix is NULL.
973 */
974 static void command_list(const char *zPrefix, int cmdMask){
975 int i, nCmd;
976 int nPrefix = zPrefix ? strlen(zPrefix) : 0;
977 const char *aCmd[count(aCommand)];
978 for(i=nCmd=0; i<count(aCommand); i++){
979 const char *z = aCommand[i].zName;
980 if( (aCommand[i].cmdFlags & cmdMask)==0 ) continue;
981 if( zPrefix && memcmp(zPrefix, z, nPrefix)!=0 ) continue;
982 aCmd[nCmd++] = aCommand[i].zName;
983 }
984 multi_column_list(aCmd, nCmd);
985 }
986
987 /*
988 ** COMMAND: test-list-webpage
989 **
990 ** List all web pages.
991 */
992 void cmd_test_webpage_list(void){
993 int i, nCmd;
994 const char *aCmd[count(aCommand)];
995 for(i=nCmd=0; i<count(aCommand); i++){
996 if(0x08 & aCommand[i].cmdFlags){
997 aCmd[nCmd++] = aWebpage[i].zName;
998 }
999 }
1000 assert(nCmd && "page list is empty?");
1001 multi_column_list(aCmd, nCmd);
1002 }
1003
1004
1005
1006 /*
1007 ** This function returns a human readable version string.
1008 */
@@ -1143,294 +1027,10 @@
1143 @ </pre></blockquote>
1144 style_footer();
1145 }
1146
1147
1148 /*
1149 ** COMMAND: help
1150 **
1151 ** Usage: %fossil help COMMAND
1152 ** or: %fossil COMMAND --help
1153 **
1154 ** Display information on how to use COMMAND. To display a list of
1155 ** available commands use one of:
1156 **
1157 ** %fossil help Show common commands
1158 ** %fossil help -a|--all Show both common and auxiliary commands
1159 ** %fossil help -t|--test Show test commands only
1160 ** %fossil help -x|--aux Show auxiliary commands only
1161 ** %fossil help -w|--www Show list of WWW pages
1162 */
1163 void help_cmd(void){
1164 int rc, idx, isPage = 0;
1165 const char *z;
1166 const char *zCmdOrPage;
1167 const char *zCmdOrPagePlural;
1168 if( g.argc<3 ){
1169 z = g.argv[0];
1170 fossil_print(
1171 "Usage: %s help COMMAND\n"
1172 "Common COMMANDs: (use \"%s help -a|--all\" for a complete list)\n",
1173 z, z);
1174 command_list(0, CMDFLAG_1ST_TIER);
1175 version_cmd();
1176 return;
1177 }
1178 if( find_option("all","a",0) ){
1179 command_list(0, CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER);
1180 return;
1181 }
1182 else if( find_option("www","w",0) ){
1183 command_list(0, CMDFLAG_WEBPAGE);
1184 return;
1185 }
1186 else if( find_option("aux","x",0) ){
1187 command_list(0, CMDFLAG_2ND_TIER);
1188 return;
1189 }
1190 else if( find_option("test","t",0) ){
1191 command_list(0, CMDFLAG_TEST);
1192 return;
1193 }
1194 isPage = ('/' == *g.argv[2]) ? 1 : 0;
1195 if(isPage){
1196 zCmdOrPage = "page";
1197 zCmdOrPagePlural = "pages";
1198 }else{
1199 zCmdOrPage = "command";
1200 zCmdOrPagePlural = "commands";
1201 }
1202 rc = name_search(g.argv[2], aCommand, count(aCommand), 0, &idx);
1203 if( rc==1 ){
1204 fossil_print("unknown %s: %s\nAvailable %s:\n",
1205 zCmdOrPage, g.argv[2], zCmdOrPagePlural);
1206 command_list(0, isPage ? CMDFLAG_WEBPAGE : (0xff & ~CMDFLAG_WEBPAGE));
1207 fossil_exit(1);
1208 }else if( rc==2 ){
1209 fossil_print("ambiguous %s prefix: %s\nMatching %s:\n",
1210 zCmdOrPage, g.argv[2], zCmdOrPagePlural);
1211 command_list(g.argv[2], 0xff);
1212 fossil_exit(1);
1213 }
1214 z = aCmdHelp[idx].zText;
1215 if( z==0 ){
1216 fossil_fatal("no help available for the %s %s",
1217 aCommand[idx].zName, zCmdOrPage);
1218 }
1219 while( *z ){
1220 if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){
1221 fossil_print("%s", g.argv[0]);
1222 z += 7;
1223 }else{
1224 putchar(*z);
1225 z++;
1226 }
1227 }
1228 putchar('\n');
1229 }
1230
1231 /*
1232 ** COMMAND: test-all-help
1233 **
1234 ** Usage: %fossil test-all-help ?OPTIONS?
1235 **
1236 ** Show help text for commands and pages. Useful for proof-reading.
1237 ** Defaults to just the CLI commands. Specify --www to see only the
1238 ** web pages, or --everything to see both commands and pages.
1239 **
1240 ** Options:
1241 ** -e|--everything Show all commands and pages.
1242 ** -t|--test Include test- commands
1243 ** -w|--www Show WWW pages.
1244 */
1245 void test_all_help_cmd(void){
1246 int i;
1247 int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER;
1248
1249 if( find_option("www","w",0) ){
1250 mask = CMDFLAG_WEBPAGE;
1251 }
1252 if( find_option("everything","e",0) ){
1253 mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE;
1254 }
1255 if( find_option("test","t",0) ){
1256 mask |= CMDFLAG_TEST;
1257 }
1258 fossil_print("Help text for:\n");
1259 if( mask & CMDFLAG_1ST_TIER ) fossil_print(" * Commands\n");
1260 if( mask & CMDFLAG_2ND_TIER ) fossil_print(" * Auxiliary commands\n");
1261 if( mask & CMDFLAG_TEST ) fossil_print(" * Test commands\n");
1262 if( mask & CMDFLAG_WEBPAGE ) fossil_print(" * Web pages\n");
1263 fossil_print("---\n");
1264 for(i=0; i<count(aCommand); i++){
1265 if( (aCommand[i].cmdFlags & mask)==0 ) continue;
1266 fossil_print("# %s\n", aCommand[i].zName);
1267 fossil_print("%s\n\n", aCmdHelp[i].zText);
1268 }
1269 fossil_print("---\n");
1270 version_cmd();
1271 }
1272
1273 /*
1274 ** WEBPAGE: help
1275 ** URL: /help?name=CMD
1276 **
1277 ** Show the built-in help text for CMD. CMD can be a command-line interface
1278 ** command or a page name from the web interface.
1279 */
1280 void help_page(void){
1281 const char *zCmd = P("cmd");
1282
1283 if( zCmd==0 ) zCmd = P("name");
1284 style_header("Command-line Help");
1285 if( zCmd ){
1286 int rc, idx;
1287 char *z, *s, *d;
1288 style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop);
1289 if( *zCmd=='/' ){
1290 /* Some of the webpages require query parameters in order to work.
1291 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
1292 @ <h1>The "%s(zCmd)" page:</h1>
1293 }else{
1294 @ <h1>The "%s(zCmd)" command:</h1>
1295 }
1296 rc = name_search(zCmd, aCommand, count(aCommand), 0, &idx);
1297 if( rc==1 ){
1298 @ unknown command: %s(zCmd)
1299 }else if( rc==2 ){
1300 @ ambiguous command prefix: %s(zCmd)
1301 }else{
1302 z = (char*)aCmdHelp[idx].zText;
1303 if( z==0 ){
1304 @ no help available for the %s(aCommand[idx].zName) command
1305 }else{
1306 z=s=d=mprintf("%s",z);
1307 while( *s ){
1308 if( *s=='%' && strncmp(s, "%fossil", 7)==0 ){
1309 s++;
1310 }else{
1311 *d++ = *s++;
1312 }
1313 }
1314 *d = 0;
1315 @ <blockquote><pre>
1316 @ %h(z)
1317 @ </pre></blockquote>
1318 fossil_free(z);
1319 }
1320 }
1321 }else{
1322 int i, j, n;
1323
1324 @ <h1>Available commands:</h1>
1325 @ <table border="0"><tr>
1326 for(i=j=0; i<count(aCommand); i++){
1327 const char *z = aCommand[i].zName;
1328 if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
1329 j++;
1330 }
1331 n = (j+6)/7;
1332 for(i=j=0; i<count(aCommand); i++){
1333 const char *z = aCommand[i].zName;
1334 if( '/'==*z || strncmp(z,"test",4)==0 ) continue;
1335 if( j==0 ){
1336 @ <td valign="top"><ul>
1337 }
1338 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
1339 j++;
1340 if( j>=n ){
1341 @ </ul></td>
1342 j = 0;
1343 }
1344 }
1345 if( j>0 ){
1346 @ </ul></td>
1347 }
1348 @ </tr></table>
1349
1350 @ <h1>Available web UI pages:</h1>
1351 @ <table border="0"><tr>
1352 for(i=j=0; i<count(aCommand); i++){
1353 const char *z = aCommand[i].zName;
1354 if( '/'!=*z ) continue;
1355 j++;
1356 }
1357 n = (j+4)/5;
1358 for(i=j=0; i<count(aCommand); i++){
1359 const char *z = aCommand[i].zName;
1360 if( '/'!=*z ) continue;
1361 if( j==0 ){
1362 @ <td valign="top"><ul>
1363 }
1364 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1365 @ <li><a href="%R/help?cmd=%s(z)">%s(z+1)</a></li>
1366 }else{
1367 @ <li>%s(z+1)</li>
1368 }
1369 j++;
1370 if( j>=n ){
1371 @ </ul></td>
1372 j = 0;
1373 }
1374 }
1375 if( j>0 ){
1376 @ </ul></td>
1377 }
1378 @ </tr></table>
1379
1380 @ <h1>Unsupported commands:</h1>
1381 @ <table border="0"><tr>
1382 for(i=j=0; i<count(aCommand); i++){
1383 const char *z = aCommand[i].zName;
1384 if( strncmp(z,"test",4)!=0 ) continue;
1385 j++;
1386 }
1387 n = (j+3)/4;
1388 for(i=j=0; i<count(aCommand); i++){
1389 const char *z = aCommand[i].zName;
1390 if( strncmp(z,"test",4)!=0 ) continue;
1391 if( j==0 ){
1392 @ <td valign="top"><ul>
1393 }
1394 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1395 @ <li><a href="%R/help?cmd=%s(z)">%s(z)</a></li>
1396 }else{
1397 @ <li>%s(z)</li>
1398 }
1399 j++;
1400 if( j>=n ){
1401 @ </ul></td>
1402 j = 0;
1403 }
1404 }
1405 if( j>0 ){
1406 @ </ul></td>
1407 }
1408 @ </tr></table>
1409
1410 }
1411 style_footer();
1412 }
1413
1414 /*
1415 ** WEBPAGE: test-all-help
1416 **
1417 ** Show all help text on a single page. Useful for proof-reading.
1418 */
1419 void test_all_help_page(void){
1420 int i;
1421 style_header("Testpage: All Help Text");
1422 for(i=0; i<count(aCommand); i++){
1423 if( memcmp(aCommand[i].zName, "test", 4)==0 ) continue;
1424 @ <h2>%s(aCommand[i].zName):</h2>
1425 @ <blockquote><pre>
1426 @ %h(aCmdHelp[i].zText)
1427 @ </pre></blockquote>
1428 }
1429 style_footer();
1430 }
1431
1432 /*
1433 ** Set the g.zBaseURL value to the full URL for the toplevel of
1434 ** the fossil tree. Set g.zTop to g.zBaseURL without the
1435 ** leading "http://" and the host and port.
1436 **
@@ -1646,12 +1246,12 @@
1646 int allowRepoList /* Send repo list for "/" URL */
1647 ){
1648 const char *zPathInfo;
1649 const char *zDirPathInfo;
1650 char *zPath = NULL;
1651 int idx;
1652 int i;
 
1653
1654 /* Handle universal query parameters */
1655 if( PB("utc") ){
1656 g.fTimeFormat = 1;
1657 }else if( PB("localtime") ){
@@ -1886,11 +1486,11 @@
1886 }
1887
1888 /* Locate the method specified by the path and execute the function
1889 ** that implements that method.
1890 */
1891 if( name_search(g.zPath, aWebpage, count(aWebpage), 0, &idx) ){
1892 #ifdef FOSSIL_ENABLE_JSON
1893 if(g.json.isJsonMode){
1894 json_err(FSL_JSON_E_RESOURCE_NOT_FOUND,NULL,0);
1895 }else
1896 #endif
@@ -1914,11 +1514,11 @@
1914 Th_WebpageNotify(g.zPath, 0);
1915 }
1916 }
1917 #endif
1918 }
1919 }else if( aWebpage[idx].xFunc!=page_xfer && db_schema_is_outofdate() ){
1920 #ifdef FOSSIL_ENABLE_JSON
1921 if(g.json.isJsonMode){
1922 json_err(FSL_JSON_E_DB_NEEDS_REBUILD,NULL,0);
1923 }else
1924 #endif
@@ -1946,22 +1546,22 @@
1946 ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
1947 ** executed.
1948 */
1949 int rc;
1950 if( !g.fNoThHook ){
1951 rc = Th_WebpageHook(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
1952 }else{
1953 rc = TH_OK;
1954 }
1955 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
1956 if( rc==TH_OK || rc==TH_RETURN ){
1957 #endif
1958 aWebpage[idx].xFunc();
1959 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1960 }
1961 if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1962 Th_WebpageNotify(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
1963 }
1964 }
1965 #endif
1966 }
1967
1968
--- src/main.c
+++ src/main.c
@@ -294,65 +294,10 @@
294
295 #endif
296
297 Global g;
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299 /*
300 ** atexit() handler which frees up "some" of the resources
301 ** used by fossil.
302 */
303 static void fossil_atexit(void) {
@@ -590,11 +535,11 @@
535 #endif
536 int main(int argc, char **argv)
537 #endif
538 {
539 const char *zCmdName = "unknown";
540 const CmdOrPage *pCmd = 0;
541 int rc;
542 if( sqlite3_libversion_number()<3014000 ){
543 fossil_fatal("Unsuitable SQLite version %s, must be at least 3.14.0",
544 sqlite3_libversion());
545 }
@@ -734,11 +679,11 @@
679 fossil_fatal("file descriptor 2 is not open. (fd=%d, errno=%d)",
680 fd, x);
681 }
682 }
683 #endif
684 rc = dispatch_name_search(zCmdName, CMDFLAG_COMMAND|CMDFLAG_PREFIX, &pCmd);
685 if( rc==1 ){
686 #ifdef FOSSIL_ENABLE_TH1_HOOKS
687 if( !g.isHTTP && !g.fNoThHook ){
688 rc = Th_CommandHook(zCmdName, 0);
689 }else{
@@ -746,11 +691,11 @@
691 }
692 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
693 if( rc==TH_OK || rc==TH_RETURN ){
694 #endif
695 fossil_fatal("%s: unknown command: %s\n"
696 "%s: use \"help\" for more information",
697 g.argv[0], zCmdName, g.argv[0]);
698 #ifdef FOSSIL_ENABLE_TH1_HOOKS
699 }
700 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
701 Th_CommandNotify(zCmdName, 0);
@@ -757,19 +702,13 @@
702 }
703 }
704 fossil_exit(0);
705 #endif
706 }else if( rc==2 ){
 
707 Blob couldbe;
708 blob_init(&couldbe,0,0);
709 dispatch_matching_names(zCmdName, &couldbe);
 
 
 
 
 
710 fossil_print("%s: ambiguous command prefix: %s\n"
711 "%s: could be any of:%s\n"
712 "%s: use \"help\" for more information\n",
713 g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
714 fossil_exit(1);
@@ -792,22 +731,22 @@
731 **
732 ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
733 ** executed.
734 */
735 if( !g.isHTTP && !g.fNoThHook ){
736 rc = Th_CommandHook(pCmd->zName, pCmd->eCmdFlags);
737 }else{
738 rc = TH_OK;
739 }
740 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
741 if( rc==TH_OK || rc==TH_RETURN ){
742 #endif
743 pCmd->xFunc();
744 #ifdef FOSSIL_ENABLE_TH1_HOOKS
745 }
746 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
747 Th_CommandNotify(pCmd->zName, pCmd->eCmdFlags);
748 }
749 }
750 #endif
751 fossil_exit(0);
752 /*NOT_REACHED*/
@@ -944,65 +883,10 @@
883 }
884
885 /*
886 ** Print a list of words in multiple columns.
887 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
888
889
890 /*
891 ** This function returns a human readable version string.
892 */
@@ -1143,294 +1027,10 @@
1027 @ </pre></blockquote>
1028 style_footer();
1029 }
1030
1031
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1032 /*
1033 ** Set the g.zBaseURL value to the full URL for the toplevel of
1034 ** the fossil tree. Set g.zTop to g.zBaseURL without the
1035 ** leading "http://" and the host and port.
1036 **
@@ -1646,12 +1246,12 @@
1246 int allowRepoList /* Send repo list for "/" URL */
1247 ){
1248 const char *zPathInfo;
1249 const char *zDirPathInfo;
1250 char *zPath = NULL;
 
1251 int i;
1252 const CmdOrPage *pCmd = 0;
1253
1254 /* Handle universal query parameters */
1255 if( PB("utc") ){
1256 g.fTimeFormat = 1;
1257 }else if( PB("localtime") ){
@@ -1886,11 +1486,11 @@
1486 }
1487
1488 /* Locate the method specified by the path and execute the function
1489 ** that implements that method.
1490 */
1491 if( dispatch_name_search(g.zPath-1, CMDFLAG_WEBPAGE, &pCmd) ){
1492 #ifdef FOSSIL_ENABLE_JSON
1493 if(g.json.isJsonMode){
1494 json_err(FSL_JSON_E_RESOURCE_NOT_FOUND,NULL,0);
1495 }else
1496 #endif
@@ -1914,11 +1514,11 @@
1514 Th_WebpageNotify(g.zPath, 0);
1515 }
1516 }
1517 #endif
1518 }
1519 }else if( pCmd->xFunc!=page_xfer && db_schema_is_outofdate() ){
1520 #ifdef FOSSIL_ENABLE_JSON
1521 if(g.json.isJsonMode){
1522 json_err(FSL_JSON_E_DB_NEEDS_REBUILD,NULL,0);
1523 }else
1524 #endif
@@ -1946,22 +1546,22 @@
1546 ** TH_CONTINUE: The xFunc() will be skipped, the TH1 notification will be
1547 ** executed.
1548 */
1549 int rc;
1550 if( !g.fNoThHook ){
1551 rc = Th_WebpageHook(pCmd->zName+1, pCmd->eCmdFlags);
1552 }else{
1553 rc = TH_OK;
1554 }
1555 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
1556 if( rc==TH_OK || rc==TH_RETURN ){
1557 #endif
1558 pCmd->xFunc();
1559 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1560 }
1561 if( !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1562 Th_WebpageNotify(pCmd->zName+1, pCmd->eCmdFlags);
1563 }
1564 }
1565 #endif
1566 }
1567
1568
+12
--- src/main.mk
+++ src/main.mk
@@ -38,10 +38,11 @@
3838
$(SRCDIR)/delta.c \
3939
$(SRCDIR)/deltacmd.c \
4040
$(SRCDIR)/descendants.c \
4141
$(SRCDIR)/diff.c \
4242
$(SRCDIR)/diffcmd.c \
43
+ $(SRCDIR)/dispatch.c \
4344
$(SRCDIR)/doc.c \
4445
$(SRCDIR)/encode.c \
4546
$(SRCDIR)/event.c \
4647
$(SRCDIR)/export.c \
4748
$(SRCDIR)/file.c \
@@ -212,10 +213,11 @@
212213
$(OBJDIR)/delta_.c \
213214
$(OBJDIR)/deltacmd_.c \
214215
$(OBJDIR)/descendants_.c \
215216
$(OBJDIR)/diff_.c \
216217
$(OBJDIR)/diffcmd_.c \
218
+ $(OBJDIR)/dispatch_.c \
217219
$(OBJDIR)/doc_.c \
218220
$(OBJDIR)/encode_.c \
219221
$(OBJDIR)/event_.c \
220222
$(OBJDIR)/export_.c \
221223
$(OBJDIR)/file_.c \
@@ -335,10 +337,11 @@
335337
$(OBJDIR)/delta.o \
336338
$(OBJDIR)/deltacmd.o \
337339
$(OBJDIR)/descendants.o \
338340
$(OBJDIR)/diff.o \
339341
$(OBJDIR)/diffcmd.o \
342
+ $(OBJDIR)/dispatch.o \
340343
$(OBJDIR)/doc.o \
341344
$(OBJDIR)/encode.o \
342345
$(OBJDIR)/event.o \
343346
$(OBJDIR)/export.o \
344347
$(OBJDIR)/file.o \
@@ -613,10 +616,11 @@
613616
$(OBJDIR)/delta_.c:$(OBJDIR)/delta.h \
614617
$(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h \
615618
$(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h \
616619
$(OBJDIR)/diff_.c:$(OBJDIR)/diff.h \
617620
$(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h \
621
+ $(OBJDIR)/dispatch_.c:$(OBJDIR)/dispatch.h \
618622
$(OBJDIR)/doc_.c:$(OBJDIR)/doc.h \
619623
$(OBJDIR)/encode_.c:$(OBJDIR)/encode.h \
620624
$(OBJDIR)/event_.c:$(OBJDIR)/event.h \
621625
$(OBJDIR)/export_.c:$(OBJDIR)/export.h \
622626
$(OBJDIR)/file_.c:$(OBJDIR)/file.h \
@@ -922,10 +926,18 @@
922926
923927
$(OBJDIR)/diffcmd.o: $(OBJDIR)/diffcmd_.c $(OBJDIR)/diffcmd.h $(SRCDIR)/config.h
924928
$(XTCC) -o $(OBJDIR)/diffcmd.o -c $(OBJDIR)/diffcmd_.c
925929
926930
$(OBJDIR)/diffcmd.h: $(OBJDIR)/headers
931
+
932
+$(OBJDIR)/dispatch_.c: $(SRCDIR)/dispatch.c $(OBJDIR)/translate
933
+ $(OBJDIR)/translate $(SRCDIR)/dispatch.c >$@
934
+
935
+$(OBJDIR)/dispatch.o: $(OBJDIR)/dispatch_.c $(OBJDIR)/dispatch.h $(SRCDIR)/config.h
936
+ $(XTCC) -o $(OBJDIR)/dispatch.o -c $(OBJDIR)/dispatch_.c
937
+
938
+$(OBJDIR)/dispatch.h: $(OBJDIR)/headers
927939
928940
$(OBJDIR)/doc_.c: $(SRCDIR)/doc.c $(OBJDIR)/translate
929941
$(OBJDIR)/translate $(SRCDIR)/doc.c >$@
930942
931943
$(OBJDIR)/doc.o: $(OBJDIR)/doc_.c $(OBJDIR)/doc.h $(SRCDIR)/config.h
932944
--- src/main.mk
+++ src/main.mk
@@ -38,10 +38,11 @@
38 $(SRCDIR)/delta.c \
39 $(SRCDIR)/deltacmd.c \
40 $(SRCDIR)/descendants.c \
41 $(SRCDIR)/diff.c \
42 $(SRCDIR)/diffcmd.c \
 
43 $(SRCDIR)/doc.c \
44 $(SRCDIR)/encode.c \
45 $(SRCDIR)/event.c \
46 $(SRCDIR)/export.c \
47 $(SRCDIR)/file.c \
@@ -212,10 +213,11 @@
212 $(OBJDIR)/delta_.c \
213 $(OBJDIR)/deltacmd_.c \
214 $(OBJDIR)/descendants_.c \
215 $(OBJDIR)/diff_.c \
216 $(OBJDIR)/diffcmd_.c \
 
217 $(OBJDIR)/doc_.c \
218 $(OBJDIR)/encode_.c \
219 $(OBJDIR)/event_.c \
220 $(OBJDIR)/export_.c \
221 $(OBJDIR)/file_.c \
@@ -335,10 +337,11 @@
335 $(OBJDIR)/delta.o \
336 $(OBJDIR)/deltacmd.o \
337 $(OBJDIR)/descendants.o \
338 $(OBJDIR)/diff.o \
339 $(OBJDIR)/diffcmd.o \
 
340 $(OBJDIR)/doc.o \
341 $(OBJDIR)/encode.o \
342 $(OBJDIR)/event.o \
343 $(OBJDIR)/export.o \
344 $(OBJDIR)/file.o \
@@ -613,10 +616,11 @@
613 $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h \
614 $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h \
615 $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h \
616 $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h \
617 $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h \
 
618 $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h \
619 $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h \
620 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
621 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
622 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
@@ -922,10 +926,18 @@
922
923 $(OBJDIR)/diffcmd.o: $(OBJDIR)/diffcmd_.c $(OBJDIR)/diffcmd.h $(SRCDIR)/config.h
924 $(XTCC) -o $(OBJDIR)/diffcmd.o -c $(OBJDIR)/diffcmd_.c
925
926 $(OBJDIR)/diffcmd.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
927
928 $(OBJDIR)/doc_.c: $(SRCDIR)/doc.c $(OBJDIR)/translate
929 $(OBJDIR)/translate $(SRCDIR)/doc.c >$@
930
931 $(OBJDIR)/doc.o: $(OBJDIR)/doc_.c $(OBJDIR)/doc.h $(SRCDIR)/config.h
932
--- src/main.mk
+++ src/main.mk
@@ -38,10 +38,11 @@
38 $(SRCDIR)/delta.c \
39 $(SRCDIR)/deltacmd.c \
40 $(SRCDIR)/descendants.c \
41 $(SRCDIR)/diff.c \
42 $(SRCDIR)/diffcmd.c \
43 $(SRCDIR)/dispatch.c \
44 $(SRCDIR)/doc.c \
45 $(SRCDIR)/encode.c \
46 $(SRCDIR)/event.c \
47 $(SRCDIR)/export.c \
48 $(SRCDIR)/file.c \
@@ -212,10 +213,11 @@
213 $(OBJDIR)/delta_.c \
214 $(OBJDIR)/deltacmd_.c \
215 $(OBJDIR)/descendants_.c \
216 $(OBJDIR)/diff_.c \
217 $(OBJDIR)/diffcmd_.c \
218 $(OBJDIR)/dispatch_.c \
219 $(OBJDIR)/doc_.c \
220 $(OBJDIR)/encode_.c \
221 $(OBJDIR)/event_.c \
222 $(OBJDIR)/export_.c \
223 $(OBJDIR)/file_.c \
@@ -335,10 +337,11 @@
337 $(OBJDIR)/delta.o \
338 $(OBJDIR)/deltacmd.o \
339 $(OBJDIR)/descendants.o \
340 $(OBJDIR)/diff.o \
341 $(OBJDIR)/diffcmd.o \
342 $(OBJDIR)/dispatch.o \
343 $(OBJDIR)/doc.o \
344 $(OBJDIR)/encode.o \
345 $(OBJDIR)/event.o \
346 $(OBJDIR)/export.o \
347 $(OBJDIR)/file.o \
@@ -613,10 +616,11 @@
616 $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h \
617 $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h \
618 $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h \
619 $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h \
620 $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h \
621 $(OBJDIR)/dispatch_.c:$(OBJDIR)/dispatch.h \
622 $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h \
623 $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h \
624 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
625 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
626 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
@@ -922,10 +926,18 @@
926
927 $(OBJDIR)/diffcmd.o: $(OBJDIR)/diffcmd_.c $(OBJDIR)/diffcmd.h $(SRCDIR)/config.h
928 $(XTCC) -o $(OBJDIR)/diffcmd.o -c $(OBJDIR)/diffcmd_.c
929
930 $(OBJDIR)/diffcmd.h: $(OBJDIR)/headers
931
932 $(OBJDIR)/dispatch_.c: $(SRCDIR)/dispatch.c $(OBJDIR)/translate
933 $(OBJDIR)/translate $(SRCDIR)/dispatch.c >$@
934
935 $(OBJDIR)/dispatch.o: $(OBJDIR)/dispatch_.c $(OBJDIR)/dispatch.h $(SRCDIR)/config.h
936 $(XTCC) -o $(OBJDIR)/dispatch.o -c $(OBJDIR)/dispatch_.c
937
938 $(OBJDIR)/dispatch.h: $(OBJDIR)/headers
939
940 $(OBJDIR)/doc_.c: $(SRCDIR)/doc.c $(OBJDIR)/translate
941 $(OBJDIR)/translate $(SRCDIR)/doc.c >$@
942
943 $(OBJDIR)/doc.o: $(OBJDIR)/doc_.c $(OBJDIR)/doc.h $(SRCDIR)/config.h
944
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -45,10 +45,11 @@
4545
delta
4646
deltacmd
4747
descendants
4848
diff
4949
diffcmd
50
+ dispatch
5051
doc
5152
encode
5253
event
5354
export
5455
file
5556
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -45,10 +45,11 @@
45 delta
46 deltacmd
47 descendants
48 diff
49 diffcmd
 
50 doc
51 encode
52 event
53 export
54 file
55
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -45,10 +45,11 @@
45 delta
46 deltacmd
47 descendants
48 diff
49 diffcmd
50 dispatch
51 doc
52 encode
53 event
54 export
55 file
56
+45 -76
--- src/mkindex.c
+++ src/mkindex.c
@@ -60,15 +60,16 @@
6060
6161
/*
6262
** Each entry looks like this:
6363
*/
6464
typedef struct Entry {
65
- int eType;
66
- char *zIf;
67
- char *zFunc;
68
- char *zPath;
69
- char *zHelp;
65
+ int eType; /* 0: webpage, 1: command */
66
+ char *zIf; /* Enclose in #if */
67
+ char *zFunc; /* Name of implementation */
68
+ char *zPath; /* Webpage or command name */
69
+ char *zHelp; /* Help text */
70
+ int iHelp; /* Index of Help text */
7071
} Entry;
7172
7273
/*
7374
** Maximum number of entries
7475
*/
@@ -203,16 +204,18 @@
203204
zHelp[nHelp] = 0;
204205
for(k=0; k<nHelp && isspace(zHelp[k]); k++){}
205206
if( k<nHelp ){
206207
z = string_dup(&zHelp[k], nHelp-k);
207208
}else{
208
- z = 0;
209
+ z = "";
209210
}
210211
for(k=nFixed; k<nUsed; k++){
211212
aEntry[k].zIf = zIf[0] ? string_dup(zIf, -1) : 0;
212213
aEntry[k].zFunc = string_dup(&zLine[i], j);
213214
aEntry[k].zHelp = z;
215
+ z = 0;
216
+ aEntry[k].iHelp = nFixed;
214217
}
215218
i+=j;
216219
while( isspace(zLine[i]) ){ i++; }
217220
if( zLine[i]!='(' ) goto page_skip;
218221
nFixed = nUsed;
@@ -243,47 +246,45 @@
243246
/*
244247
** Build the binary search table.
245248
*/
246249
void build_table(void){
247250
int i;
251
+ int nWeb = 0;
248252
249253
qsort(aEntry, nFixed, sizeof(aEntry[0]), e_compare);
254
+
255
+ /* Output declarations for all the action functions */
250256
for(i=0; i<nFixed; i++){
251257
if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
252258
printf("extern void %s(void);\n", aEntry[i].zFunc);
253259
if( aEntry[i].zIf ) printf("#endif\n");
254260
}
255
- printf(
256
- "typedef struct NameMap NameMap;\n"
257
- "struct NameMap {\n"
258
- " const char *zName;\n"
259
- " void (*xFunc)(void);\n"
260
- " char cmdFlags;\n"
261
- "};\n"
262
- "#define CMDFLAG_1ST_TIER 0x01\n"
263
- "#define CMDFLAG_2ND_TIER 0x02\n"
264
- "#define CMDFLAG_TEST 0x04\n"
265
- "#define CMDFLAG_WEBPAGE 0x08\n"
266
- "static const NameMap aWebpage[] = {\n"
267
- );
268
- for(i=0; i<nFixed && aEntry[i].eType==0; i++){
269
- const char *z = aEntry[i].zPath;
270
- int n = strlen(z);
261
+
262
+ /* Output strings for all the help text */
263
+ for(i=0; i<nFixed; i++){
264
+ char *z = aEntry[i].zHelp;
265
+ if( z==0 ) continue;
271266
if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
272
- printf(" { \"%s\",%*s %s,%*s 1 },\n",
273
- z,
274
- 25-n, "",
275
- aEntry[i].zFunc,
276
- (int)(35-strlen(aEntry[i].zFunc)), ""
277
- );
267
+ printf("static const char zHelp%03d[] = \n", aEntry[i].iHelp);
268
+ printf(" \"");
269
+ while( *z ){
270
+ if( *z=='\n' ){
271
+ printf("\\n\"\n \"");
272
+ }else if( *z=='"' ){
273
+ printf("\\\"");
274
+ }else{
275
+ putchar(*z);
276
+ }
277
+ z++;
278
+ }
279
+ printf("\";\n");
278280
if( aEntry[i].zIf ) printf("#endif\n");
279281
}
280
- printf("};\n");
281
- printf(
282
- "static const NameMap aCommand[] = {\n"
283
- );
284
- for(i=0; i<nFixed /*&& aEntry[i].eType==1*/; i++){
282
+
283
+ /* Generate the aCommand[] table */
284
+ printf("static const CmdOrPage aCommand[] = {\n");
285
+ for(i=0; i<nFixed; i++){
285286
const char *z = aEntry[i].zPath;
286287
int n = strlen(z);
287288
int cmdFlags = (1==aEntry[i].eType) ? 0x01 : 0x08;
288289
if( 0x01==cmdFlags ){
289290
if( z[n-1]=='*' ){
@@ -291,59 +292,27 @@
291292
cmdFlags = 0x02;
292293
}else if( strncmp(z, "test-", 5)==0 ){
293294
cmdFlags = 0x04;
294295
}
295296
}
296
- if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
297
- printf(" { \"%s%.*s\",%*s %s,%*s %d },\n",
298
- (0x08 & cmdFlags) ? "/" : "",
299
- n, z,
300
- 25-n, "",
297
+ if( aEntry[i].zIf ){
298
+ printf("%s", aEntry[i].zIf);
299
+ }else if( aEntry[i].eType==0 ){
300
+ nWeb++;
301
+ }
302
+ printf(" { \"%s%.*s\",%*s%s,%*szHelp%03d, %d },\n",
303
+ (0x08 & cmdFlags) ? "/" : "", n, z,
304
+ 25-n-((0x8&cmdFlags)!=0), "",
301305
aEntry[i].zFunc,
302
- (int)(35-strlen(aEntry[i].zFunc)), "",
306
+ (int)(30-strlen(aEntry[i].zFunc)), "",
307
+ aEntry[i].iHelp,
303308
cmdFlags
304309
);
305310
if( aEntry[i].zIf ) printf("#endif\n");
306311
}
307312
printf("};\n");
308
- printf("#define FOSSIL_FIRST_CMD (sizeof(aWebpage)/sizeof(aWebpage[0]))\n");
309
- for(i=0; i<nFixed; i++){
310
- char *z = aEntry[i].zHelp;
311
- if( z && z[0] ){
312
- if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
313
- printf("static const char zHelp_%s[] = \n", aEntry[i].zFunc);
314
- printf(" \"");
315
- while( *z ){
316
- if( *z=='\n' ){
317
- printf("\\n\"\n \"");
318
- }else if( *z=='"' ){
319
- printf("\\\"");
320
- }else{
321
- putchar(*z);
322
- }
323
- z++;
324
- }
325
- printf("\";\n");
326
- if( aEntry[i].zIf ) printf("#endif\n");
327
- aEntry[i].zHelp[0] = 0;
328
- }
329
- }
330
- puts("struct CmdHelp {"
331
- "int eType; "
332
- "const char *zText;"
333
- "};");
334
- puts("static struct CmdHelp aCmdHelp[] = {");
335
- for(i=0; i<nFixed; i++){
336
- if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
337
- if( aEntry[i].zHelp==0 ){
338
- printf("{%d, 0},\n", aEntry[i].eType);
339
- }else{
340
- printf("{%d, zHelp_%s},\n", aEntry[i].eType, aEntry[i].zFunc);
341
- }
342
- if( aEntry[i].zIf ) printf("#endif\n");
343
- }
344
- printf("};\n");
313
+ printf("#define FOSSIL_FIRST_CMD %d\n", nWeb);
345314
}
346315
347316
/*
348317
** Process a single file of input
349318
*/
350319
--- src/mkindex.c
+++ src/mkindex.c
@@ -60,15 +60,16 @@
60
61 /*
62 ** Each entry looks like this:
63 */
64 typedef struct Entry {
65 int eType;
66 char *zIf;
67 char *zFunc;
68 char *zPath;
69 char *zHelp;
 
70 } Entry;
71
72 /*
73 ** Maximum number of entries
74 */
@@ -203,16 +204,18 @@
203 zHelp[nHelp] = 0;
204 for(k=0; k<nHelp && isspace(zHelp[k]); k++){}
205 if( k<nHelp ){
206 z = string_dup(&zHelp[k], nHelp-k);
207 }else{
208 z = 0;
209 }
210 for(k=nFixed; k<nUsed; k++){
211 aEntry[k].zIf = zIf[0] ? string_dup(zIf, -1) : 0;
212 aEntry[k].zFunc = string_dup(&zLine[i], j);
213 aEntry[k].zHelp = z;
 
 
214 }
215 i+=j;
216 while( isspace(zLine[i]) ){ i++; }
217 if( zLine[i]!='(' ) goto page_skip;
218 nFixed = nUsed;
@@ -243,47 +246,45 @@
243 /*
244 ** Build the binary search table.
245 */
246 void build_table(void){
247 int i;
 
248
249 qsort(aEntry, nFixed, sizeof(aEntry[0]), e_compare);
 
 
250 for(i=0; i<nFixed; i++){
251 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
252 printf("extern void %s(void);\n", aEntry[i].zFunc);
253 if( aEntry[i].zIf ) printf("#endif\n");
254 }
255 printf(
256 "typedef struct NameMap NameMap;\n"
257 "struct NameMap {\n"
258 " const char *zName;\n"
259 " void (*xFunc)(void);\n"
260 " char cmdFlags;\n"
261 "};\n"
262 "#define CMDFLAG_1ST_TIER 0x01\n"
263 "#define CMDFLAG_2ND_TIER 0x02\n"
264 "#define CMDFLAG_TEST 0x04\n"
265 "#define CMDFLAG_WEBPAGE 0x08\n"
266 "static const NameMap aWebpage[] = {\n"
267 );
268 for(i=0; i<nFixed && aEntry[i].eType==0; i++){
269 const char *z = aEntry[i].zPath;
270 int n = strlen(z);
271 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
272 printf(" { \"%s\",%*s %s,%*s 1 },\n",
273 z,
274 25-n, "",
275 aEntry[i].zFunc,
276 (int)(35-strlen(aEntry[i].zFunc)), ""
277 );
 
 
 
 
 
 
 
278 if( aEntry[i].zIf ) printf("#endif\n");
279 }
280 printf("};\n");
281 printf(
282 "static const NameMap aCommand[] = {\n"
283 );
284 for(i=0; i<nFixed /*&& aEntry[i].eType==1*/; i++){
285 const char *z = aEntry[i].zPath;
286 int n = strlen(z);
287 int cmdFlags = (1==aEntry[i].eType) ? 0x01 : 0x08;
288 if( 0x01==cmdFlags ){
289 if( z[n-1]=='*' ){
@@ -291,59 +292,27 @@
291 cmdFlags = 0x02;
292 }else if( strncmp(z, "test-", 5)==0 ){
293 cmdFlags = 0x04;
294 }
295 }
296 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
297 printf(" { \"%s%.*s\",%*s %s,%*s %d },\n",
298 (0x08 & cmdFlags) ? "/" : "",
299 n, z,
300 25-n, "",
 
 
 
301 aEntry[i].zFunc,
302 (int)(35-strlen(aEntry[i].zFunc)), "",
 
303 cmdFlags
304 );
305 if( aEntry[i].zIf ) printf("#endif\n");
306 }
307 printf("};\n");
308 printf("#define FOSSIL_FIRST_CMD (sizeof(aWebpage)/sizeof(aWebpage[0]))\n");
309 for(i=0; i<nFixed; i++){
310 char *z = aEntry[i].zHelp;
311 if( z && z[0] ){
312 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
313 printf("static const char zHelp_%s[] = \n", aEntry[i].zFunc);
314 printf(" \"");
315 while( *z ){
316 if( *z=='\n' ){
317 printf("\\n\"\n \"");
318 }else if( *z=='"' ){
319 printf("\\\"");
320 }else{
321 putchar(*z);
322 }
323 z++;
324 }
325 printf("\";\n");
326 if( aEntry[i].zIf ) printf("#endif\n");
327 aEntry[i].zHelp[0] = 0;
328 }
329 }
330 puts("struct CmdHelp {"
331 "int eType; "
332 "const char *zText;"
333 "};");
334 puts("static struct CmdHelp aCmdHelp[] = {");
335 for(i=0; i<nFixed; i++){
336 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
337 if( aEntry[i].zHelp==0 ){
338 printf("{%d, 0},\n", aEntry[i].eType);
339 }else{
340 printf("{%d, zHelp_%s},\n", aEntry[i].eType, aEntry[i].zFunc);
341 }
342 if( aEntry[i].zIf ) printf("#endif\n");
343 }
344 printf("};\n");
345 }
346
347 /*
348 ** Process a single file of input
349 */
350
--- src/mkindex.c
+++ src/mkindex.c
@@ -60,15 +60,16 @@
60
61 /*
62 ** Each entry looks like this:
63 */
64 typedef struct Entry {
65 int eType; /* 0: webpage, 1: command */
66 char *zIf; /* Enclose in #if */
67 char *zFunc; /* Name of implementation */
68 char *zPath; /* Webpage or command name */
69 char *zHelp; /* Help text */
70 int iHelp; /* Index of Help text */
71 } Entry;
72
73 /*
74 ** Maximum number of entries
75 */
@@ -203,16 +204,18 @@
204 zHelp[nHelp] = 0;
205 for(k=0; k<nHelp && isspace(zHelp[k]); k++){}
206 if( k<nHelp ){
207 z = string_dup(&zHelp[k], nHelp-k);
208 }else{
209 z = "";
210 }
211 for(k=nFixed; k<nUsed; k++){
212 aEntry[k].zIf = zIf[0] ? string_dup(zIf, -1) : 0;
213 aEntry[k].zFunc = string_dup(&zLine[i], j);
214 aEntry[k].zHelp = z;
215 z = 0;
216 aEntry[k].iHelp = nFixed;
217 }
218 i+=j;
219 while( isspace(zLine[i]) ){ i++; }
220 if( zLine[i]!='(' ) goto page_skip;
221 nFixed = nUsed;
@@ -243,47 +246,45 @@
246 /*
247 ** Build the binary search table.
248 */
249 void build_table(void){
250 int i;
251 int nWeb = 0;
252
253 qsort(aEntry, nFixed, sizeof(aEntry[0]), e_compare);
254
255 /* Output declarations for all the action functions */
256 for(i=0; i<nFixed; i++){
257 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
258 printf("extern void %s(void);\n", aEntry[i].zFunc);
259 if( aEntry[i].zIf ) printf("#endif\n");
260 }
261
262 /* Output strings for all the help text */
263 for(i=0; i<nFixed; i++){
264 char *z = aEntry[i].zHelp;
265 if( z==0 ) continue;
 
 
 
 
 
 
 
 
 
 
 
266 if( aEntry[i].zIf ) printf("%s", aEntry[i].zIf);
267 printf("static const char zHelp%03d[] = \n", aEntry[i].iHelp);
268 printf(" \"");
269 while( *z ){
270 if( *z=='\n' ){
271 printf("\\n\"\n \"");
272 }else if( *z=='"' ){
273 printf("\\\"");
274 }else{
275 putchar(*z);
276 }
277 z++;
278 }
279 printf("\";\n");
280 if( aEntry[i].zIf ) printf("#endif\n");
281 }
282
283 /* Generate the aCommand[] table */
284 printf("static const CmdOrPage aCommand[] = {\n");
285 for(i=0; i<nFixed; i++){
 
286 const char *z = aEntry[i].zPath;
287 int n = strlen(z);
288 int cmdFlags = (1==aEntry[i].eType) ? 0x01 : 0x08;
289 if( 0x01==cmdFlags ){
290 if( z[n-1]=='*' ){
@@ -291,59 +292,27 @@
292 cmdFlags = 0x02;
293 }else if( strncmp(z, "test-", 5)==0 ){
294 cmdFlags = 0x04;
295 }
296 }
297 if( aEntry[i].zIf ){
298 printf("%s", aEntry[i].zIf);
299 }else if( aEntry[i].eType==0 ){
300 nWeb++;
301 }
302 printf(" { \"%s%.*s\",%*s%s,%*szHelp%03d, %d },\n",
303 (0x08 & cmdFlags) ? "/" : "", n, z,
304 25-n-((0x8&cmdFlags)!=0), "",
305 aEntry[i].zFunc,
306 (int)(30-strlen(aEntry[i].zFunc)), "",
307 aEntry[i].iHelp,
308 cmdFlags
309 );
310 if( aEntry[i].zIf ) printf("#endif\n");
311 }
312 printf("};\n");
313 printf("#define FOSSIL_FIRST_CMD %d\n", nWeb);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
314 }
315
316 /*
317 ** Process a single file of input
318 */
319
+8 -8
--- src/th_main.c
+++ src/th_main.c
@@ -2134,11 +2134,11 @@
21342134
** evaluated script raising an error or calling [break]/[continue]) will
21352135
** cause the actual command execution to be skipped.
21362136
*/
21372137
int Th_CommandHook(
21382138
const char *zName,
2139
- char cmdFlags
2139
+ unsigned int cmdFlags
21402140
){
21412141
int rc = TH_OK;
21422142
if( !Th_AreHooksEnabled() ) return rc;
21432143
Th_FossilInit(TH_INIT_HOOK);
21442144
Th_Store("cmd_name", zName);
@@ -2190,11 +2190,11 @@
21902190
** cause an error message to be displayed to the local interactive user.
21912191
** Currently, TH1 error messages generated by this function are ignored.
21922192
*/
21932193
int Th_CommandNotify(
21942194
const char *zName,
2195
- char cmdFlags
2195
+ unsigned int cmdFlags
21962196
){
21972197
int rc = TH_OK;
21982198
if( !Th_AreHooksEnabled() ) return rc;
21992199
Th_FossilInit(TH_INIT_HOOK);
22002200
Th_Store("cmd_name", zName);
@@ -2221,11 +2221,11 @@
22212221
** evaluated script raising an error or calling [break]/[continue]) will
22222222
** cause the actual web page processing to be skipped.
22232223
*/
22242224
int Th_WebpageHook(
22252225
const char *zName,
2226
- char cmdFlags
2226
+ unsigned cmdFlags
22272227
){
22282228
int rc = TH_OK;
22292229
if( !Th_AreHooksEnabled() ) return rc;
22302230
Th_FossilInit(TH_INIT_HOOK);
22312231
Th_Store("web_name", zName);
@@ -2277,11 +2277,11 @@
22772277
** cause an error message to be displayed to the remote user.
22782278
** Currently, TH1 error messages generated by this function are ignored.
22792279
*/
22802280
int Th_WebpageNotify(
22812281
const char *zName,
2282
- char cmdFlags
2282
+ unsigned cmdFlags
22832283
){
22842284
int rc = TH_OK;
22852285
if( !Th_AreHooksEnabled() ) return rc;
22862286
Th_FossilInit(TH_INIT_HOOK);
22872287
Th_Store("web_name", zName);
@@ -2585,17 +2585,17 @@
25852585
verify_all_options();
25862586
if( g.argc<5 ){
25872587
usage("TYPE NAME FLAGS");
25882588
}
25892589
if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){
2590
- rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4]));
2590
+ rc = Th_CommandHook(g.argv[3], (unsigned int)atoi(g.argv[4]));
25912591
}else if( fossil_stricmp(g.argv[2], "cmdnotify")==0 ){
2592
- rc = Th_CommandNotify(g.argv[3], (char)atoi(g.argv[4]));
2592
+ rc = Th_CommandNotify(g.argv[3], (unsigned int)atoi(g.argv[4]));
25932593
}else if( fossil_stricmp(g.argv[2], "webhook")==0 ){
2594
- rc = Th_WebpageHook(g.argv[3], (char)atoi(g.argv[4]));
2594
+ rc = Th_WebpageHook(g.argv[3], (unsigned int)atoi(g.argv[4]));
25952595
}else if( fossil_stricmp(g.argv[2], "webnotify")==0 ){
2596
- rc = Th_WebpageNotify(g.argv[3], (char)atoi(g.argv[4]));
2596
+ rc = Th_WebpageNotify(g.argv[3], (unsigned int)atoi(g.argv[4]));
25972597
}else{
25982598
fossil_fatal("Unknown TH1 hook %s\n", g.argv[2]);
25992599
}
26002600
if( g.interp ){
26012601
zResult = (char*)Th_GetResult(g.interp, &nResult);
26022602
--- src/th_main.c
+++ src/th_main.c
@@ -2134,11 +2134,11 @@
2134 ** evaluated script raising an error or calling [break]/[continue]) will
2135 ** cause the actual command execution to be skipped.
2136 */
2137 int Th_CommandHook(
2138 const char *zName,
2139 char cmdFlags
2140 ){
2141 int rc = TH_OK;
2142 if( !Th_AreHooksEnabled() ) return rc;
2143 Th_FossilInit(TH_INIT_HOOK);
2144 Th_Store("cmd_name", zName);
@@ -2190,11 +2190,11 @@
2190 ** cause an error message to be displayed to the local interactive user.
2191 ** Currently, TH1 error messages generated by this function are ignored.
2192 */
2193 int Th_CommandNotify(
2194 const char *zName,
2195 char cmdFlags
2196 ){
2197 int rc = TH_OK;
2198 if( !Th_AreHooksEnabled() ) return rc;
2199 Th_FossilInit(TH_INIT_HOOK);
2200 Th_Store("cmd_name", zName);
@@ -2221,11 +2221,11 @@
2221 ** evaluated script raising an error or calling [break]/[continue]) will
2222 ** cause the actual web page processing to be skipped.
2223 */
2224 int Th_WebpageHook(
2225 const char *zName,
2226 char cmdFlags
2227 ){
2228 int rc = TH_OK;
2229 if( !Th_AreHooksEnabled() ) return rc;
2230 Th_FossilInit(TH_INIT_HOOK);
2231 Th_Store("web_name", zName);
@@ -2277,11 +2277,11 @@
2277 ** cause an error message to be displayed to the remote user.
2278 ** Currently, TH1 error messages generated by this function are ignored.
2279 */
2280 int Th_WebpageNotify(
2281 const char *zName,
2282 char cmdFlags
2283 ){
2284 int rc = TH_OK;
2285 if( !Th_AreHooksEnabled() ) return rc;
2286 Th_FossilInit(TH_INIT_HOOK);
2287 Th_Store("web_name", zName);
@@ -2585,17 +2585,17 @@
2585 verify_all_options();
2586 if( g.argc<5 ){
2587 usage("TYPE NAME FLAGS");
2588 }
2589 if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){
2590 rc = Th_CommandHook(g.argv[3], (char)atoi(g.argv[4]));
2591 }else if( fossil_stricmp(g.argv[2], "cmdnotify")==0 ){
2592 rc = Th_CommandNotify(g.argv[3], (char)atoi(g.argv[4]));
2593 }else if( fossil_stricmp(g.argv[2], "webhook")==0 ){
2594 rc = Th_WebpageHook(g.argv[3], (char)atoi(g.argv[4]));
2595 }else if( fossil_stricmp(g.argv[2], "webnotify")==0 ){
2596 rc = Th_WebpageNotify(g.argv[3], (char)atoi(g.argv[4]));
2597 }else{
2598 fossil_fatal("Unknown TH1 hook %s\n", g.argv[2]);
2599 }
2600 if( g.interp ){
2601 zResult = (char*)Th_GetResult(g.interp, &nResult);
2602
--- src/th_main.c
+++ src/th_main.c
@@ -2134,11 +2134,11 @@
2134 ** evaluated script raising an error or calling [break]/[continue]) will
2135 ** cause the actual command execution to be skipped.
2136 */
2137 int Th_CommandHook(
2138 const char *zName,
2139 unsigned int cmdFlags
2140 ){
2141 int rc = TH_OK;
2142 if( !Th_AreHooksEnabled() ) return rc;
2143 Th_FossilInit(TH_INIT_HOOK);
2144 Th_Store("cmd_name", zName);
@@ -2190,11 +2190,11 @@
2190 ** cause an error message to be displayed to the local interactive user.
2191 ** Currently, TH1 error messages generated by this function are ignored.
2192 */
2193 int Th_CommandNotify(
2194 const char *zName,
2195 unsigned int cmdFlags
2196 ){
2197 int rc = TH_OK;
2198 if( !Th_AreHooksEnabled() ) return rc;
2199 Th_FossilInit(TH_INIT_HOOK);
2200 Th_Store("cmd_name", zName);
@@ -2221,11 +2221,11 @@
2221 ** evaluated script raising an error or calling [break]/[continue]) will
2222 ** cause the actual web page processing to be skipped.
2223 */
2224 int Th_WebpageHook(
2225 const char *zName,
2226 unsigned cmdFlags
2227 ){
2228 int rc = TH_OK;
2229 if( !Th_AreHooksEnabled() ) return rc;
2230 Th_FossilInit(TH_INIT_HOOK);
2231 Th_Store("web_name", zName);
@@ -2277,11 +2277,11 @@
2277 ** cause an error message to be displayed to the remote user.
2278 ** Currently, TH1 error messages generated by this function are ignored.
2279 */
2280 int Th_WebpageNotify(
2281 const char *zName,
2282 unsigned cmdFlags
2283 ){
2284 int rc = TH_OK;
2285 if( !Th_AreHooksEnabled() ) return rc;
2286 Th_FossilInit(TH_INIT_HOOK);
2287 Th_Store("web_name", zName);
@@ -2585,17 +2585,17 @@
2585 verify_all_options();
2586 if( g.argc<5 ){
2587 usage("TYPE NAME FLAGS");
2588 }
2589 if( fossil_stricmp(g.argv[2], "cmdhook")==0 ){
2590 rc = Th_CommandHook(g.argv[3], (unsigned int)atoi(g.argv[4]));
2591 }else if( fossil_stricmp(g.argv[2], "cmdnotify")==0 ){
2592 rc = Th_CommandNotify(g.argv[3], (unsigned int)atoi(g.argv[4]));
2593 }else if( fossil_stricmp(g.argv[2], "webhook")==0 ){
2594 rc = Th_WebpageHook(g.argv[3], (unsigned int)atoi(g.argv[4]));
2595 }else if( fossil_stricmp(g.argv[2], "webnotify")==0 ){
2596 rc = Th_WebpageNotify(g.argv[3], (unsigned int)atoi(g.argv[4]));
2597 }else{
2598 fossil_fatal("Unknown TH1 hook %s\n", g.argv[2]);
2599 }
2600 if( g.interp ){
2601 zResult = (char*)Th_GetResult(g.interp, &nResult);
2602
+10 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
2828
2929
SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
33
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
33
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
3434
35
-OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
35
+OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
3636
3737
3838
RC=$(DMDIR)\bin\rcc
3939
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
4040
@@ -49,11 +49,11 @@
4949
5050
$(OBJDIR)\fossil.res: $B\win\fossil.rc
5151
$(RC) $(RCFLAGS) -o$@ $**
5252
5353
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54
- +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
54
+ +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
5555
+echo fossil >> $@
5656
+echo fossil >> $@
5757
+echo $(LIBS) >> $@
5858
+echo. >> $@
5959
+echo fossil >> $@
@@ -278,10 +278,16 @@
278278
$(OBJDIR)\diffcmd$O : diffcmd_.c diffcmd.h
279279
$(TCC) -o$@ -c diffcmd_.c
280280
281281
diffcmd_.c : $(SRCDIR)\diffcmd.c
282282
+translate$E $** > $@
283
+
284
+$(OBJDIR)\dispatch$O : dispatch_.c dispatch.h
285
+ $(TCC) -o$@ -c dispatch_.c
286
+
287
+dispatch_.c : $(SRCDIR)\dispatch.c
288
+ +translate$E $** > $@
283289
284290
$(OBJDIR)\doc$O : doc_.c doc.h
285291
$(TCC) -o$@ -c doc_.c
286292
287293
doc_.c : $(SRCDIR)\doc.c
@@ -850,7 +856,7 @@
850856
851857
zip_.c : $(SRCDIR)\zip.c
852858
+translate$E $** > $@
853859
854860
headers: makeheaders$E page_index.h builtin_data.h VERSION.h
855
- +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
861
+ +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
856862
@copy /Y nul: headers
857863
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -278,10 +278,16 @@
278 $(OBJDIR)\diffcmd$O : diffcmd_.c diffcmd.h
279 $(TCC) -o$@ -c diffcmd_.c
280
281 diffcmd_.c : $(SRCDIR)\diffcmd.c
282 +translate$E $** > $@
 
 
 
 
 
 
283
284 $(OBJDIR)\doc$O : doc_.c doc.h
285 $(TCC) -o$@ -c doc_.c
286
287 doc_.c : $(SRCDIR)\doc.c
@@ -850,7 +856,7 @@
850
851 zip_.c : $(SRCDIR)\zip.c
852 +translate$E $** > $@
853
854 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
855 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
856 @copy /Y nul: headers
857
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_SHARED_CACHE -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS5
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_SHELL_IS_UTF8=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c dispatch_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fshell_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c unversioned_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c
34
35 OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\dispatch$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fshell$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\unversioned$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -49,11 +49,11 @@
49
50 $(OBJDIR)\fossil.res: $B\win\fossil.rc
51 $(RC) $(RCFLAGS) -o$@ $**
52
53 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
54 +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd dispatch doc encode event export file finfo foci fshell fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode unversioned update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@
55 +echo fossil >> $@
56 +echo fossil >> $@
57 +echo $(LIBS) >> $@
58 +echo. >> $@
59 +echo fossil >> $@
@@ -278,10 +278,16 @@
278 $(OBJDIR)\diffcmd$O : diffcmd_.c diffcmd.h
279 $(TCC) -o$@ -c diffcmd_.c
280
281 diffcmd_.c : $(SRCDIR)\diffcmd.c
282 +translate$E $** > $@
283
284 $(OBJDIR)\dispatch$O : dispatch_.c dispatch.h
285 $(TCC) -o$@ -c dispatch_.c
286
287 dispatch_.c : $(SRCDIR)\dispatch.c
288 +translate$E $** > $@
289
290 $(OBJDIR)\doc$O : doc_.c doc.h
291 $(TCC) -o$@ -c doc_.c
292
293 doc_.c : $(SRCDIR)\doc.c
@@ -850,7 +856,7 @@
856
857 zip_.c : $(SRCDIR)\zip.c
858 +translate$E $** > $@
859
860 headers: makeheaders$E page_index.h builtin_data.h VERSION.h
861 +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h dispatch_.c:dispatch.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fshell_.c:fshell.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h unversioned_.c:unversioned.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h
862 @copy /Y nul: headers
863
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -447,10 +447,11 @@
447447
$(SRCDIR)/delta.c \
448448
$(SRCDIR)/deltacmd.c \
449449
$(SRCDIR)/descendants.c \
450450
$(SRCDIR)/diff.c \
451451
$(SRCDIR)/diffcmd.c \
452
+ $(SRCDIR)/dispatch.c \
452453
$(SRCDIR)/doc.c \
453454
$(SRCDIR)/encode.c \
454455
$(SRCDIR)/event.c \
455456
$(SRCDIR)/export.c \
456457
$(SRCDIR)/file.c \
@@ -621,10 +622,11 @@
621622
$(OBJDIR)/delta_.c \
622623
$(OBJDIR)/deltacmd_.c \
623624
$(OBJDIR)/descendants_.c \
624625
$(OBJDIR)/diff_.c \
625626
$(OBJDIR)/diffcmd_.c \
627
+ $(OBJDIR)/dispatch_.c \
626628
$(OBJDIR)/doc_.c \
627629
$(OBJDIR)/encode_.c \
628630
$(OBJDIR)/event_.c \
629631
$(OBJDIR)/export_.c \
630632
$(OBJDIR)/file_.c \
@@ -744,10 +746,11 @@
744746
$(OBJDIR)/delta.o \
745747
$(OBJDIR)/deltacmd.o \
746748
$(OBJDIR)/descendants.o \
747749
$(OBJDIR)/diff.o \
748750
$(OBJDIR)/diffcmd.o \
751
+ $(OBJDIR)/dispatch.o \
749752
$(OBJDIR)/doc.o \
750753
$(OBJDIR)/encode.o \
751754
$(OBJDIR)/event.o \
752755
$(OBJDIR)/export.o \
753756
$(OBJDIR)/file.o \
@@ -1078,10 +1081,11 @@
10781081
$(OBJDIR)/delta_.c:$(OBJDIR)/delta.h \
10791082
$(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h \
10801083
$(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h \
10811084
$(OBJDIR)/diff_.c:$(OBJDIR)/diff.h \
10821085
$(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h \
1086
+ $(OBJDIR)/dispatch_.c:$(OBJDIR)/dispatch.h \
10831087
$(OBJDIR)/doc_.c:$(OBJDIR)/doc.h \
10841088
$(OBJDIR)/encode_.c:$(OBJDIR)/encode.h \
10851089
$(OBJDIR)/event_.c:$(OBJDIR)/event.h \
10861090
$(OBJDIR)/export_.c:$(OBJDIR)/export.h \
10871091
$(OBJDIR)/file_.c:$(OBJDIR)/file.h \
@@ -1389,10 +1393,18 @@
13891393
13901394
$(OBJDIR)/diffcmd.o: $(OBJDIR)/diffcmd_.c $(OBJDIR)/diffcmd.h $(SRCDIR)/config.h
13911395
$(XTCC) -o $(OBJDIR)/diffcmd.o -c $(OBJDIR)/diffcmd_.c
13921396
13931397
$(OBJDIR)/diffcmd.h: $(OBJDIR)/headers
1398
+
1399
+$(OBJDIR)/dispatch_.c: $(SRCDIR)/dispatch.c $(TRANSLATE)
1400
+ $(TRANSLATE) $(SRCDIR)/dispatch.c >$@
1401
+
1402
+$(OBJDIR)/dispatch.o: $(OBJDIR)/dispatch_.c $(OBJDIR)/dispatch.h $(SRCDIR)/config.h
1403
+ $(XTCC) -o $(OBJDIR)/dispatch.o -c $(OBJDIR)/dispatch_.c
1404
+
1405
+$(OBJDIR)/dispatch.h: $(OBJDIR)/headers
13941406
13951407
$(OBJDIR)/doc_.c: $(SRCDIR)/doc.c $(TRANSLATE)
13961408
$(TRANSLATE) $(SRCDIR)/doc.c >$@
13971409
13981410
$(OBJDIR)/doc.o: $(OBJDIR)/doc_.c $(OBJDIR)/doc.h $(SRCDIR)/config.h
13991411
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -447,10 +447,11 @@
447 $(SRCDIR)/delta.c \
448 $(SRCDIR)/deltacmd.c \
449 $(SRCDIR)/descendants.c \
450 $(SRCDIR)/diff.c \
451 $(SRCDIR)/diffcmd.c \
 
452 $(SRCDIR)/doc.c \
453 $(SRCDIR)/encode.c \
454 $(SRCDIR)/event.c \
455 $(SRCDIR)/export.c \
456 $(SRCDIR)/file.c \
@@ -621,10 +622,11 @@
621 $(OBJDIR)/delta_.c \
622 $(OBJDIR)/deltacmd_.c \
623 $(OBJDIR)/descendants_.c \
624 $(OBJDIR)/diff_.c \
625 $(OBJDIR)/diffcmd_.c \
 
626 $(OBJDIR)/doc_.c \
627 $(OBJDIR)/encode_.c \
628 $(OBJDIR)/event_.c \
629 $(OBJDIR)/export_.c \
630 $(OBJDIR)/file_.c \
@@ -744,10 +746,11 @@
744 $(OBJDIR)/delta.o \
745 $(OBJDIR)/deltacmd.o \
746 $(OBJDIR)/descendants.o \
747 $(OBJDIR)/diff.o \
748 $(OBJDIR)/diffcmd.o \
 
749 $(OBJDIR)/doc.o \
750 $(OBJDIR)/encode.o \
751 $(OBJDIR)/event.o \
752 $(OBJDIR)/export.o \
753 $(OBJDIR)/file.o \
@@ -1078,10 +1081,11 @@
1078 $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h \
1079 $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h \
1080 $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h \
1081 $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h \
1082 $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h \
 
1083 $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h \
1084 $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h \
1085 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
1086 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
1087 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
@@ -1389,10 +1393,18 @@
1389
1390 $(OBJDIR)/diffcmd.o: $(OBJDIR)/diffcmd_.c $(OBJDIR)/diffcmd.h $(SRCDIR)/config.h
1391 $(XTCC) -o $(OBJDIR)/diffcmd.o -c $(OBJDIR)/diffcmd_.c
1392
1393 $(OBJDIR)/diffcmd.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1394
1395 $(OBJDIR)/doc_.c: $(SRCDIR)/doc.c $(TRANSLATE)
1396 $(TRANSLATE) $(SRCDIR)/doc.c >$@
1397
1398 $(OBJDIR)/doc.o: $(OBJDIR)/doc_.c $(OBJDIR)/doc.h $(SRCDIR)/config.h
1399
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -447,10 +447,11 @@
447 $(SRCDIR)/delta.c \
448 $(SRCDIR)/deltacmd.c \
449 $(SRCDIR)/descendants.c \
450 $(SRCDIR)/diff.c \
451 $(SRCDIR)/diffcmd.c \
452 $(SRCDIR)/dispatch.c \
453 $(SRCDIR)/doc.c \
454 $(SRCDIR)/encode.c \
455 $(SRCDIR)/event.c \
456 $(SRCDIR)/export.c \
457 $(SRCDIR)/file.c \
@@ -621,10 +622,11 @@
622 $(OBJDIR)/delta_.c \
623 $(OBJDIR)/deltacmd_.c \
624 $(OBJDIR)/descendants_.c \
625 $(OBJDIR)/diff_.c \
626 $(OBJDIR)/diffcmd_.c \
627 $(OBJDIR)/dispatch_.c \
628 $(OBJDIR)/doc_.c \
629 $(OBJDIR)/encode_.c \
630 $(OBJDIR)/event_.c \
631 $(OBJDIR)/export_.c \
632 $(OBJDIR)/file_.c \
@@ -744,10 +746,11 @@
746 $(OBJDIR)/delta.o \
747 $(OBJDIR)/deltacmd.o \
748 $(OBJDIR)/descendants.o \
749 $(OBJDIR)/diff.o \
750 $(OBJDIR)/diffcmd.o \
751 $(OBJDIR)/dispatch.o \
752 $(OBJDIR)/doc.o \
753 $(OBJDIR)/encode.o \
754 $(OBJDIR)/event.o \
755 $(OBJDIR)/export.o \
756 $(OBJDIR)/file.o \
@@ -1078,10 +1081,11 @@
1081 $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h \
1082 $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h \
1083 $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h \
1084 $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h \
1085 $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h \
1086 $(OBJDIR)/dispatch_.c:$(OBJDIR)/dispatch.h \
1087 $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h \
1088 $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h \
1089 $(OBJDIR)/event_.c:$(OBJDIR)/event.h \
1090 $(OBJDIR)/export_.c:$(OBJDIR)/export.h \
1091 $(OBJDIR)/file_.c:$(OBJDIR)/file.h \
@@ -1389,10 +1393,18 @@
1393
1394 $(OBJDIR)/diffcmd.o: $(OBJDIR)/diffcmd_.c $(OBJDIR)/diffcmd.h $(SRCDIR)/config.h
1395 $(XTCC) -o $(OBJDIR)/diffcmd.o -c $(OBJDIR)/diffcmd_.c
1396
1397 $(OBJDIR)/diffcmd.h: $(OBJDIR)/headers
1398
1399 $(OBJDIR)/dispatch_.c: $(SRCDIR)/dispatch.c $(TRANSLATE)
1400 $(TRANSLATE) $(SRCDIR)/dispatch.c >$@
1401
1402 $(OBJDIR)/dispatch.o: $(OBJDIR)/dispatch_.c $(OBJDIR)/dispatch.h $(SRCDIR)/config.h
1403 $(XTCC) -o $(OBJDIR)/dispatch.o -c $(OBJDIR)/dispatch_.c
1404
1405 $(OBJDIR)/dispatch.h: $(OBJDIR)/headers
1406
1407 $(OBJDIR)/doc_.c: $(SRCDIR)/doc.c $(TRANSLATE)
1408 $(TRANSLATE) $(SRCDIR)/doc.c >$@
1409
1410 $(OBJDIR)/doc.o: $(OBJDIR)/doc_.c $(OBJDIR)/doc.h $(SRCDIR)/config.h
1411
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -367,10 +367,11 @@
367367
delta_.c \
368368
deltacmd_.c \
369369
descendants_.c \
370370
diff_.c \
371371
diffcmd_.c \
372
+ dispatch_.c \
372373
doc_.c \
373374
encode_.c \
374375
event_.c \
375376
export_.c \
376377
file_.c \
@@ -540,10 +541,11 @@
540541
$(OX)\delta$O \
541542
$(OX)\deltacmd$O \
542543
$(OX)\descendants$O \
543544
$(OX)\diff$O \
544545
$(OX)\diffcmd$O \
546
+ $(OX)\dispatch$O \
545547
$(OX)\doc$O \
546548
$(OX)\encode$O \
547549
$(OX)\event$O \
548550
$(OX)\export$O \
549551
$(OX)\file$O \
@@ -722,10 +724,11 @@
722724
echo $(OX)\delta.obj >> $@
723725
echo $(OX)\deltacmd.obj >> $@
724726
echo $(OX)\descendants.obj >> $@
725727
echo $(OX)\diff.obj >> $@
726728
echo $(OX)\diffcmd.obj >> $@
729
+ echo $(OX)\dispatch.obj >> $@
727730
echo $(OX)\doc.obj >> $@
728731
echo $(OX)\encode.obj >> $@
729732
echo $(OX)\event.obj >> $@
730733
echo $(OX)\export.obj >> $@
731734
echo $(OX)\file.obj >> $@
@@ -1088,10 +1091,16 @@
10881091
$(OX)\diffcmd$O : diffcmd_.c diffcmd.h
10891092
$(TCC) /Fo$@ -c diffcmd_.c
10901093
10911094
diffcmd_.c : $(SRCDIR)\diffcmd.c
10921095
translate$E $** > $@
1096
+
1097
+$(OX)\dispatch$O : dispatch_.c dispatch.h
1098
+ $(TCC) /Fo$@ -c dispatch_.c
1099
+
1100
+dispatch_.c : $(SRCDIR)\dispatch.c
1101
+ translate$E $** > $@
10931102
10941103
$(OX)\doc$O : doc_.c doc.h
10951104
$(TCC) /Fo$@ -c doc_.c
10961105
10971106
doc_.c : $(SRCDIR)\doc.c
@@ -1689,10 +1698,11 @@
16891698
delta_.c:delta.h \
16901699
deltacmd_.c:deltacmd.h \
16911700
descendants_.c:descendants.h \
16921701
diff_.c:diff.h \
16931702
diffcmd_.c:diffcmd.h \
1703
+ dispatch_.c:dispatch.h \
16941704
doc_.c:doc.h \
16951705
encode_.c:encode.h \
16961706
event_.c:event.h \
16971707
export_.c:export.h \
16981708
file_.c:file.h \
16991709
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -367,10 +367,11 @@
367 delta_.c \
368 deltacmd_.c \
369 descendants_.c \
370 diff_.c \
371 diffcmd_.c \
 
372 doc_.c \
373 encode_.c \
374 event_.c \
375 export_.c \
376 file_.c \
@@ -540,10 +541,11 @@
540 $(OX)\delta$O \
541 $(OX)\deltacmd$O \
542 $(OX)\descendants$O \
543 $(OX)\diff$O \
544 $(OX)\diffcmd$O \
 
545 $(OX)\doc$O \
546 $(OX)\encode$O \
547 $(OX)\event$O \
548 $(OX)\export$O \
549 $(OX)\file$O \
@@ -722,10 +724,11 @@
722 echo $(OX)\delta.obj >> $@
723 echo $(OX)\deltacmd.obj >> $@
724 echo $(OX)\descendants.obj >> $@
725 echo $(OX)\diff.obj >> $@
726 echo $(OX)\diffcmd.obj >> $@
 
727 echo $(OX)\doc.obj >> $@
728 echo $(OX)\encode.obj >> $@
729 echo $(OX)\event.obj >> $@
730 echo $(OX)\export.obj >> $@
731 echo $(OX)\file.obj >> $@
@@ -1088,10 +1091,16 @@
1088 $(OX)\diffcmd$O : diffcmd_.c diffcmd.h
1089 $(TCC) /Fo$@ -c diffcmd_.c
1090
1091 diffcmd_.c : $(SRCDIR)\diffcmd.c
1092 translate$E $** > $@
 
 
 
 
 
 
1093
1094 $(OX)\doc$O : doc_.c doc.h
1095 $(TCC) /Fo$@ -c doc_.c
1096
1097 doc_.c : $(SRCDIR)\doc.c
@@ -1689,10 +1698,11 @@
1689 delta_.c:delta.h \
1690 deltacmd_.c:deltacmd.h \
1691 descendants_.c:descendants.h \
1692 diff_.c:diff.h \
1693 diffcmd_.c:diffcmd.h \
 
1694 doc_.c:doc.h \
1695 encode_.c:encode.h \
1696 event_.c:event.h \
1697 export_.c:export.h \
1698 file_.c:file.h \
1699
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -367,10 +367,11 @@
367 delta_.c \
368 deltacmd_.c \
369 descendants_.c \
370 diff_.c \
371 diffcmd_.c \
372 dispatch_.c \
373 doc_.c \
374 encode_.c \
375 event_.c \
376 export_.c \
377 file_.c \
@@ -540,10 +541,11 @@
541 $(OX)\delta$O \
542 $(OX)\deltacmd$O \
543 $(OX)\descendants$O \
544 $(OX)\diff$O \
545 $(OX)\diffcmd$O \
546 $(OX)\dispatch$O \
547 $(OX)\doc$O \
548 $(OX)\encode$O \
549 $(OX)\event$O \
550 $(OX)\export$O \
551 $(OX)\file$O \
@@ -722,10 +724,11 @@
724 echo $(OX)\delta.obj >> $@
725 echo $(OX)\deltacmd.obj >> $@
726 echo $(OX)\descendants.obj >> $@
727 echo $(OX)\diff.obj >> $@
728 echo $(OX)\diffcmd.obj >> $@
729 echo $(OX)\dispatch.obj >> $@
730 echo $(OX)\doc.obj >> $@
731 echo $(OX)\encode.obj >> $@
732 echo $(OX)\event.obj >> $@
733 echo $(OX)\export.obj >> $@
734 echo $(OX)\file.obj >> $@
@@ -1088,10 +1091,16 @@
1091 $(OX)\diffcmd$O : diffcmd_.c diffcmd.h
1092 $(TCC) /Fo$@ -c diffcmd_.c
1093
1094 diffcmd_.c : $(SRCDIR)\diffcmd.c
1095 translate$E $** > $@
1096
1097 $(OX)\dispatch$O : dispatch_.c dispatch.h
1098 $(TCC) /Fo$@ -c dispatch_.c
1099
1100 dispatch_.c : $(SRCDIR)\dispatch.c
1101 translate$E $** > $@
1102
1103 $(OX)\doc$O : doc_.c doc.h
1104 $(TCC) /Fo$@ -c doc_.c
1105
1106 doc_.c : $(SRCDIR)\doc.c
@@ -1689,10 +1698,11 @@
1698 delta_.c:delta.h \
1699 deltacmd_.c:deltacmd.h \
1700 descendants_.c:descendants.h \
1701 diff_.c:diff.h \
1702 diffcmd_.c:diffcmd.h \
1703 dispatch_.c:dispatch.h \
1704 doc_.c:doc.h \
1705 encode_.c:encode.h \
1706 event_.c:event.h \
1707 export_.c:export.h \
1708 file_.c:file.h \
1709

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button