Fossil SCM

Add the ability to include -OR- omit support for TH1 hooks at compile-time.

mistachkin 2014-06-08 20:19 th1Hooks
Commit b3c40dd49ea8de84f15c2effbb5d212e037a557f
+6
--- auto.def
+++ auto.def
@@ -4,10 +4,11 @@
44
55
options {
66
with-openssl:path|auto|none
77
=> {Look for openssl in the given path, or auto or none}
88
with-zlib:path => {Look for zlib in the given path}
9
+ with-th1-hooks=0 => {Enable TH1 hooks for commands and unknown web pages}
910
with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
1011
with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
1112
with-tcl-private-stubs=0
1213
=> {Enable Tcl integration via private stubs mechanism}
1314
internal-sqlite=1 => {Don't use the internal SQLite, use the system one}
@@ -79,10 +80,15 @@
7980
# have #ifdef guards around the whole file without
8081
# reading config.h first.
8182
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
8283
define FOSSIL_ENABLE_JSON
8384
}
85
+
86
+if {[opt-bool with-th1-hooks]} {
87
+ define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_HOOKS
88
+ define FOSSIL_ENABLE_TH1_HOOKS
89
+}
8490
8591
#if {[opt-bool markdown]} {
8692
# # no-op. Markdown is now enabled by default.
8793
#}
8894
8995
--- auto.def
+++ auto.def
@@ -4,10 +4,11 @@
4
5 options {
6 with-openssl:path|auto|none
7 => {Look for openssl in the given path, or auto or none}
8 with-zlib:path => {Look for zlib in the given path}
 
9 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
10 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
11 with-tcl-private-stubs=0
12 => {Enable Tcl integration via private stubs mechanism}
13 internal-sqlite=1 => {Don't use the internal SQLite, use the system one}
@@ -79,10 +80,15 @@
79 # have #ifdef guards around the whole file without
80 # reading config.h first.
81 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
82 define FOSSIL_ENABLE_JSON
83 }
 
 
 
 
 
84
85 #if {[opt-bool markdown]} {
86 # # no-op. Markdown is now enabled by default.
87 #}
88
89
--- auto.def
+++ auto.def
@@ -4,10 +4,11 @@
4
5 options {
6 with-openssl:path|auto|none
7 => {Look for openssl in the given path, or auto or none}
8 with-zlib:path => {Look for zlib in the given path}
9 with-th1-hooks=0 => {Enable TH1 hooks for commands and unknown web pages}
10 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
11 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
12 with-tcl-private-stubs=0
13 => {Enable Tcl integration via private stubs mechanism}
14 internal-sqlite=1 => {Don't use the internal SQLite, use the system one}
@@ -79,10 +80,15 @@
80 # have #ifdef guards around the whole file without
81 # reading config.h first.
82 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
83 define FOSSIL_ENABLE_JSON
84 }
85
86 if {[opt-bool with-th1-hooks]} {
87 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_HOOKS
88 define FOSSIL_ENABLE_TH1_HOOKS
89 }
90
91 #if {[opt-bool markdown]} {
92 # # no-op. Markdown is now enabled by default.
93 #}
94
95
+20 -1
--- src/main.c
+++ src/main.c
@@ -194,11 +194,13 @@
194194
char zCsrfToken[12]; /* Value of the anti-CSRF token */
195195
int okCsrf; /* Anti-CSRF token is present and valid */
196196
197197
int parseCnt[10]; /* Counts of artifacts parsed */
198198
FILE *fDebug; /* Write debug information here, if the file exists */
199
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
199200
int fNoThHook; /* Disable all TH1 command/webpage hooks */
201
+#endif
200202
int thTrace; /* True to enable TH1 debugging output */
201203
Blob thLog; /* Text of the TH1 debugging output */
202204
203205
int isHome; /* True if rendering the "home" page */
204206
@@ -621,11 +623,13 @@
621623
g.fSshClient = 0;
622624
g.zSshCmd = 0;
623625
if( g.fSqlTrace ) g.fSqlStats = 1;
624626
g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
625627
g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
628
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
626629
g.fNoThHook = find_option("no-th-hook", 0, 0)!=0;
630
+#endif
627631
g.zHttpAuth = 0;
628632
g.zLogin = find_option("user", "U", 1);
629633
g.zSSLIdentity = find_option("ssl-identity", 0, 1);
630634
g.zErrlog = find_option("errorlog", 0, 1);
631635
if( find_option("utc",0,0) ) g.fTimeFormat = 1;
@@ -651,25 +655,29 @@
651655
if( !is_valid_fd(2) ) fossil_panic("file descriptor 2 not open");
652656
/* if( is_valid_fd(3) ) fossil_warning("file descriptor 3 is open"); */
653657
#endif
654658
rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
655659
if( rc==1 ){
660
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
656661
if( !g.isHTTP && !g.fNoThHook ){
657662
rc = Th_CommandHook(zCmdName, 0);
658663
}else{
659664
rc = TH_OK;
660665
}
661666
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
662667
if( rc==TH_OK || rc==TH_RETURN ){
668
+#endif
663669
fossil_fatal("%s: unknown command: %s\n"
664670
"%s: use \"help\" for more information\n",
665671
g.argv[0], zCmdName, g.argv[0]);
672
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
666673
}
667674
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
668675
Th_CommandNotify(zCmdName, 0);
669676
}
670677
}
678
+#endif
671679
fossil_exit(0);
672680
}else if( rc==2 ){
673681
int i, n;
674682
Blob couldbe;
675683
blob_zero(&couldbe);
@@ -684,10 +692,11 @@
684692
"%s: use \"help\" for more information\n",
685693
g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
686694
fossil_exit(1);
687695
}
688696
atexit( fossil_atexit );
697
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
689698
/*
690699
** The TH1 return codes from the hook will be handled as follows:
691700
**
692701
** TH_OK: The xFunc() and the TH1 notification will both be executed.
693702
**
@@ -705,15 +714,20 @@
705714
rc = Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags);
706715
}else{
707716
rc = TH_OK;
708717
}
709718
if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
710
- if( rc==TH_OK || rc==TH_RETURN ){ aCommand[idx].xFunc(); }
719
+ if( rc==TH_OK || rc==TH_RETURN ){
720
+#endif
721
+ aCommand[idx].xFunc();
722
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
723
+ }
711724
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
712725
Th_CommandNotify(aCommand[idx].zName, aCommand[idx].cmdFlags);
713726
}
714727
}
728
+#endif
715729
fossil_exit(0);
716730
/*NOT_REACHED*/
717731
return 0;
718732
}
719733
@@ -901,10 +915,13 @@
901915
fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
902916
fossil_print("Schema version %s\n", AUX_SCHEMA);
903917
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
904918
#if defined(FOSSIL_ENABLE_SSL)
905919
fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
920
+#endif
921
+#if defined(FOSSIL_ENABLE_TH1_HOOKS)
922
+ fossil_print("TH1_HOOKS\n");
906923
#endif
907924
#if defined(FOSSIL_ENABLE_TCL)
908925
Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
909926
rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
910927
zRc = Th_ReturnCodeName(rc, 0);
@@ -1550,10 +1567,11 @@
15501567
@ <h1>Server Configuration Error</h1>
15511568
@ <p>The database schema on the server is out-of-date. Please ask
15521569
@ the administrator to run <b>fossil rebuild</b>.</p>
15531570
}
15541571
}else{
1572
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
15551573
/*
15561574
** The TH1 return codes from the hook will be handled as follows:
15571575
**
15581576
** TH_OK: The xFunc() and the TH1 notification will both be executed.
15591577
**
@@ -1577,10 +1595,11 @@
15771595
if( rc==TH_OK || rc==TH_RETURN ){ aWebpage[idx].xFunc(); }
15781596
if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
15791597
Th_WebpageNotify(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
15801598
}
15811599
}
1600
+#endif
15821601
}
15831602
15841603
/* Return the result.
15851604
*/
15861605
cgi_reply();
15871606
--- src/main.c
+++ src/main.c
@@ -194,11 +194,13 @@
194 char zCsrfToken[12]; /* Value of the anti-CSRF token */
195 int okCsrf; /* Anti-CSRF token is present and valid */
196
197 int parseCnt[10]; /* Counts of artifacts parsed */
198 FILE *fDebug; /* Write debug information here, if the file exists */
 
199 int fNoThHook; /* Disable all TH1 command/webpage hooks */
 
200 int thTrace; /* True to enable TH1 debugging output */
201 Blob thLog; /* Text of the TH1 debugging output */
202
203 int isHome; /* True if rendering the "home" page */
204
@@ -621,11 +623,13 @@
621 g.fSshClient = 0;
622 g.zSshCmd = 0;
623 if( g.fSqlTrace ) g.fSqlStats = 1;
624 g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
625 g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
 
626 g.fNoThHook = find_option("no-th-hook", 0, 0)!=0;
 
627 g.zHttpAuth = 0;
628 g.zLogin = find_option("user", "U", 1);
629 g.zSSLIdentity = find_option("ssl-identity", 0, 1);
630 g.zErrlog = find_option("errorlog", 0, 1);
631 if( find_option("utc",0,0) ) g.fTimeFormat = 1;
@@ -651,25 +655,29 @@
651 if( !is_valid_fd(2) ) fossil_panic("file descriptor 2 not open");
652 /* if( is_valid_fd(3) ) fossil_warning("file descriptor 3 is open"); */
653 #endif
654 rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
655 if( rc==1 ){
 
656 if( !g.isHTTP && !g.fNoThHook ){
657 rc = Th_CommandHook(zCmdName, 0);
658 }else{
659 rc = TH_OK;
660 }
661 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
662 if( rc==TH_OK || rc==TH_RETURN ){
 
663 fossil_fatal("%s: unknown command: %s\n"
664 "%s: use \"help\" for more information\n",
665 g.argv[0], zCmdName, g.argv[0]);
 
666 }
667 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
668 Th_CommandNotify(zCmdName, 0);
669 }
670 }
 
671 fossil_exit(0);
672 }else if( rc==2 ){
673 int i, n;
674 Blob couldbe;
675 blob_zero(&couldbe);
@@ -684,10 +692,11 @@
684 "%s: use \"help\" for more information\n",
685 g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
686 fossil_exit(1);
687 }
688 atexit( fossil_atexit );
 
689 /*
690 ** The TH1 return codes from the hook will be handled as follows:
691 **
692 ** TH_OK: The xFunc() and the TH1 notification will both be executed.
693 **
@@ -705,15 +714,20 @@
705 rc = Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags);
706 }else{
707 rc = TH_OK;
708 }
709 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
710 if( rc==TH_OK || rc==TH_RETURN ){ aCommand[idx].xFunc(); }
 
 
 
 
711 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
712 Th_CommandNotify(aCommand[idx].zName, aCommand[idx].cmdFlags);
713 }
714 }
 
715 fossil_exit(0);
716 /*NOT_REACHED*/
717 return 0;
718 }
719
@@ -901,10 +915,13 @@
901 fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
902 fossil_print("Schema version %s\n", AUX_SCHEMA);
903 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
904 #if defined(FOSSIL_ENABLE_SSL)
905 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
 
 
 
906 #endif
907 #if defined(FOSSIL_ENABLE_TCL)
908 Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
909 rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
910 zRc = Th_ReturnCodeName(rc, 0);
@@ -1550,10 +1567,11 @@
1550 @ <h1>Server Configuration Error</h1>
1551 @ <p>The database schema on the server is out-of-date. Please ask
1552 @ the administrator to run <b>fossil rebuild</b>.</p>
1553 }
1554 }else{
 
1555 /*
1556 ** The TH1 return codes from the hook will be handled as follows:
1557 **
1558 ** TH_OK: The xFunc() and the TH1 notification will both be executed.
1559 **
@@ -1577,10 +1595,11 @@
1577 if( rc==TH_OK || rc==TH_RETURN ){ aWebpage[idx].xFunc(); }
1578 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1579 Th_WebpageNotify(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
1580 }
1581 }
 
1582 }
1583
1584 /* Return the result.
1585 */
1586 cgi_reply();
1587
--- src/main.c
+++ src/main.c
@@ -194,11 +194,13 @@
194 char zCsrfToken[12]; /* Value of the anti-CSRF token */
195 int okCsrf; /* Anti-CSRF token is present and valid */
196
197 int parseCnt[10]; /* Counts of artifacts parsed */
198 FILE *fDebug; /* Write debug information here, if the file exists */
199 #ifdef FOSSIL_ENABLE_TH1_HOOKS
200 int fNoThHook; /* Disable all TH1 command/webpage hooks */
201 #endif
202 int thTrace; /* True to enable TH1 debugging output */
203 Blob thLog; /* Text of the TH1 debugging output */
204
205 int isHome; /* True if rendering the "home" page */
206
@@ -621,11 +623,13 @@
623 g.fSshClient = 0;
624 g.zSshCmd = 0;
625 if( g.fSqlTrace ) g.fSqlStats = 1;
626 g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
627 g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
628 #ifdef FOSSIL_ENABLE_TH1_HOOKS
629 g.fNoThHook = find_option("no-th-hook", 0, 0)!=0;
630 #endif
631 g.zHttpAuth = 0;
632 g.zLogin = find_option("user", "U", 1);
633 g.zSSLIdentity = find_option("ssl-identity", 0, 1);
634 g.zErrlog = find_option("errorlog", 0, 1);
635 if( find_option("utc",0,0) ) g.fTimeFormat = 1;
@@ -651,25 +655,29 @@
655 if( !is_valid_fd(2) ) fossil_panic("file descriptor 2 not open");
656 /* if( is_valid_fd(3) ) fossil_warning("file descriptor 3 is open"); */
657 #endif
658 rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
659 if( rc==1 ){
660 #ifdef FOSSIL_ENABLE_TH1_HOOKS
661 if( !g.isHTTP && !g.fNoThHook ){
662 rc = Th_CommandHook(zCmdName, 0);
663 }else{
664 rc = TH_OK;
665 }
666 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
667 if( rc==TH_OK || rc==TH_RETURN ){
668 #endif
669 fossil_fatal("%s: unknown command: %s\n"
670 "%s: use \"help\" for more information\n",
671 g.argv[0], zCmdName, g.argv[0]);
672 #ifdef FOSSIL_ENABLE_TH1_HOOKS
673 }
674 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
675 Th_CommandNotify(zCmdName, 0);
676 }
677 }
678 #endif
679 fossil_exit(0);
680 }else if( rc==2 ){
681 int i, n;
682 Blob couldbe;
683 blob_zero(&couldbe);
@@ -684,10 +692,11 @@
692 "%s: use \"help\" for more information\n",
693 g.argv[0], zCmdName, g.argv[0], blob_str(&couldbe), g.argv[0]);
694 fossil_exit(1);
695 }
696 atexit( fossil_atexit );
697 #ifdef FOSSIL_ENABLE_TH1_HOOKS
698 /*
699 ** The TH1 return codes from the hook will be handled as follows:
700 **
701 ** TH_OK: The xFunc() and the TH1 notification will both be executed.
702 **
@@ -705,15 +714,20 @@
714 rc = Th_CommandHook(aCommand[idx].zName, aCommand[idx].cmdFlags);
715 }else{
716 rc = TH_OK;
717 }
718 if( rc==TH_OK || rc==TH_RETURN || rc==TH_CONTINUE ){
719 if( rc==TH_OK || rc==TH_RETURN ){
720 #endif
721 aCommand[idx].xFunc();
722 #ifdef FOSSIL_ENABLE_TH1_HOOKS
723 }
724 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
725 Th_CommandNotify(aCommand[idx].zName, aCommand[idx].cmdFlags);
726 }
727 }
728 #endif
729 fossil_exit(0);
730 /*NOT_REACHED*/
731 return 0;
732 }
733
@@ -901,10 +915,13 @@
915 fossil_print("SQLite %s %.30s\n", sqlite3_libversion(), sqlite3_sourceid());
916 fossil_print("Schema version %s\n", AUX_SCHEMA);
917 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
918 #if defined(FOSSIL_ENABLE_SSL)
919 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
920 #endif
921 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
922 fossil_print("TH1_HOOKS\n");
923 #endif
924 #if defined(FOSSIL_ENABLE_TCL)
925 Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
926 rc = Th_Eval(g.interp, 0, "tclInvoke info patchlevel", -1);
927 zRc = Th_ReturnCodeName(rc, 0);
@@ -1550,10 +1567,11 @@
1567 @ <h1>Server Configuration Error</h1>
1568 @ <p>The database schema on the server is out-of-date. Please ask
1569 @ the administrator to run <b>fossil rebuild</b>.</p>
1570 }
1571 }else{
1572 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1573 /*
1574 ** The TH1 return codes from the hook will be handled as follows:
1575 **
1576 ** TH_OK: The xFunc() and the TH1 notification will both be executed.
1577 **
@@ -1577,10 +1595,11 @@
1595 if( rc==TH_OK || rc==TH_RETURN ){ aWebpage[idx].xFunc(); }
1596 if( !g.isHTTP && !g.fNoThHook && (rc==TH_OK || rc==TH_CONTINUE) ){
1597 Th_WebpageNotify(aWebpage[idx].zName, aWebpage[idx].cmdFlags);
1598 }
1599 }
1600 #endif
1601 }
1602
1603 /* Return the result.
1604 */
1605 cgi_reply();
1606
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -408,10 +408,14 @@
408408
# FOSSIL_ENABLE_JSON = 1
409409
410410
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
411411
#
412412
# FOSSIL_ENABLE_SSL = 1
413
+
414
+#### Enable hooks for commands and unknown web pages via TH1
415
+#
416
+# FOSSIL_ENABLE_TH1_HOOKS = 1
413417
414418
#### Enable scripting support via Tcl/Tk
415419
#
416420
# FOSSIL_ENABLE_TCL = 1
417421
@@ -537,10 +541,16 @@
537541
# With HTTPS support
538542
ifdef FOSSIL_ENABLE_SSL
539543
TCC += -DFOSSIL_ENABLE_SSL=1
540544
RCC += -DFOSSIL_ENABLE_SSL=1
541545
endif
546
+
547
+# With TH1 hook support
548
+ifdef FOSSIL_ENABLE_TH1_HOOKS
549
+TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
550
+RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
551
+endif
542552
543553
# With Tcl support
544554
ifdef FOSSIL_ENABLE_TCL
545555
TCC += -DFOSSIL_ENABLE_TCL=1
546556
RCC += -DFOSSIL_ENABLE_TCL=1
@@ -1024,10 +1034,13 @@
10241034
# Uncomment to enable JSON API
10251035
# FOSSIL_ENABLE_JSON = 1
10261036
10271037
# Uncomment to enable SSL support
10281038
# FOSSIL_ENABLE_SSL = 1
1039
+
1040
+# Uncomment to enable TH1 hooks
1041
+# FOSSIL_ENABLE_TH1_HOOKS = 1
10291042
10301043
# Uncomment to enable Tcl support
10311044
# FOSSIL_ENABLE_TCL = 1
10321045
10331046
!ifdef FOSSIL_ENABLE_SSL
@@ -1082,10 +1095,15 @@
10821095
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
10831096
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
10841097
LIBS = $(LIBS) $(SSLLIB)
10851098
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
10861099
!endif
1100
+
1101
+!ifdef FOSSIL_ENABLE_TH1_HOOKS
1102
+TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1103
+RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1104
+!endif
10871105
10881106
!ifdef FOSSIL_ENABLE_TCL
10891107
TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
10901108
RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
10911109
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
10921110
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -408,10 +408,14 @@
408 # FOSSIL_ENABLE_JSON = 1
409
410 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
411 #
412 # FOSSIL_ENABLE_SSL = 1
 
 
 
 
413
414 #### Enable scripting support via Tcl/Tk
415 #
416 # FOSSIL_ENABLE_TCL = 1
417
@@ -537,10 +541,16 @@
537 # With HTTPS support
538 ifdef FOSSIL_ENABLE_SSL
539 TCC += -DFOSSIL_ENABLE_SSL=1
540 RCC += -DFOSSIL_ENABLE_SSL=1
541 endif
 
 
 
 
 
 
542
543 # With Tcl support
544 ifdef FOSSIL_ENABLE_TCL
545 TCC += -DFOSSIL_ENABLE_TCL=1
546 RCC += -DFOSSIL_ENABLE_TCL=1
@@ -1024,10 +1034,13 @@
1024 # Uncomment to enable JSON API
1025 # FOSSIL_ENABLE_JSON = 1
1026
1027 # Uncomment to enable SSL support
1028 # FOSSIL_ENABLE_SSL = 1
 
 
 
1029
1030 # Uncomment to enable Tcl support
1031 # FOSSIL_ENABLE_TCL = 1
1032
1033 !ifdef FOSSIL_ENABLE_SSL
@@ -1082,10 +1095,15 @@
1082 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1083 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1084 LIBS = $(LIBS) $(SSLLIB)
1085 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1086 !endif
 
 
 
 
 
1087
1088 !ifdef FOSSIL_ENABLE_TCL
1089 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
1090 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
1091 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1092
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -408,10 +408,14 @@
408 # FOSSIL_ENABLE_JSON = 1
409
410 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
411 #
412 # FOSSIL_ENABLE_SSL = 1
413
414 #### Enable hooks for commands and unknown web pages via TH1
415 #
416 # FOSSIL_ENABLE_TH1_HOOKS = 1
417
418 #### Enable scripting support via Tcl/Tk
419 #
420 # FOSSIL_ENABLE_TCL = 1
421
@@ -537,10 +541,16 @@
541 # With HTTPS support
542 ifdef FOSSIL_ENABLE_SSL
543 TCC += -DFOSSIL_ENABLE_SSL=1
544 RCC += -DFOSSIL_ENABLE_SSL=1
545 endif
546
547 # With TH1 hook support
548 ifdef FOSSIL_ENABLE_TH1_HOOKS
549 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
550 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
551 endif
552
553 # With Tcl support
554 ifdef FOSSIL_ENABLE_TCL
555 TCC += -DFOSSIL_ENABLE_TCL=1
556 RCC += -DFOSSIL_ENABLE_TCL=1
@@ -1024,10 +1034,13 @@
1034 # Uncomment to enable JSON API
1035 # FOSSIL_ENABLE_JSON = 1
1036
1037 # Uncomment to enable SSL support
1038 # FOSSIL_ENABLE_SSL = 1
1039
1040 # Uncomment to enable TH1 hooks
1041 # FOSSIL_ENABLE_TH1_HOOKS = 1
1042
1043 # Uncomment to enable Tcl support
1044 # FOSSIL_ENABLE_TCL = 1
1045
1046 !ifdef FOSSIL_ENABLE_SSL
@@ -1082,10 +1095,15 @@
1095 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1096 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1097 LIBS = $(LIBS) $(SSLLIB)
1098 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1099 !endif
1100
1101 !ifdef FOSSIL_ENABLE_TH1_HOOKS
1102 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1103 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1104 !endif
1105
1106 !ifdef FOSSIL_ENABLE_TCL
1107 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
1108 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
1109 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
1110
+7 -1
--- src/th_main.c
+++ src/th_main.c
@@ -31,21 +31,23 @@
3131
#define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */
3232
#define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */
3333
#define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH commands re-added? */
3434
#define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */
3535
#define TH_INIT_DEFAULT (TH_INIT_NONE) /* Default flags. */
36
-#define TH_INIT_HOOK (TH_INIT_NEED_CONFIG|TH_INIT_FORCE_SETUP)
36
+#define TH_INIT_HOOK (TH_INIT_NEED_CONFIG | TH_INIT_FORCE_SETUP)
3737
#endif
3838
39
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
3940
/*
4041
** These are the "well-known" TH1 error messages that occur when no hook is
4142
** registered to be called prior to executing a command or processing a web
4243
** page, respectively. If one of these errors is seen, it will not be sent
4344
** or displayed to the remote user or local interactive user, respectively.
4445
*/
4546
#define NO_COMMAND_HOOK_ERROR "no such command: command_hook"
4647
#define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook"
48
+#endif
4749
4850
/*
4951
** Global variable counting the number of outstanding calls to malloc()
5052
** made by the th1 implementation. This is used to catch memory leaks
5153
** in the interpreter. Obviously, it also means th1 is not threadsafe.
@@ -1191,10 +1193,11 @@
11911193
i += 2;
11921194
}
11931195
return i;
11941196
}
11951197
1198
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
11961199
/*
11971200
** This function is called by Fossil just prior to dispatching a command.
11981201
** Returning a value other than TH_OK from this function (i.e. via an
11991202
** evaluated script raising an error or calling [break]/[continue]) will
12001203
** cause the actual command execution to be skipped.
@@ -1316,10 +1319,11 @@
13161319
Th_Trace("[webpage_notify {%h}] => %h<br />\n", zName,
13171320
Th_ReturnCodeName(rc, 0));
13181321
}
13191322
return rc;
13201323
}
1324
+#endif
13211325
13221326
/*
13231327
** The z[] input contains text mixed with TH1 scripts.
13241328
** The TH1 scripts are contained within <th1>...</th1>.
13251329
** TH1 variables are $aaa or $<aaa>. The first form of
@@ -1419,10 +1423,11 @@
14191423
zRc = Th_ReturnCodeName(rc, 1);
14201424
fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
14211425
Th_PrintTraceLog();
14221426
}
14231427
1428
+#ifdef FOSSIL_ENABLE_TH1_HOOKS
14241429
/*
14251430
** COMMAND: test-th-hook
14261431
*/
14271432
void test_th_hook(void){
14281433
int rc = TH_OK;
@@ -1447,5 +1452,6 @@
14471452
sendText(Th_ReturnCodeName(rc, 0), -1, 0);
14481453
sendText("): ", -1, 0);
14491454
sendText(zResult, nResult, 0);
14501455
sendText("\n", -1, 0);
14511456
}
1457
+#endif
14521458
--- src/th_main.c
+++ src/th_main.c
@@ -31,21 +31,23 @@
31 #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */
32 #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */
33 #define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH commands re-added? */
34 #define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */
35 #define TH_INIT_DEFAULT (TH_INIT_NONE) /* Default flags. */
36 #define TH_INIT_HOOK (TH_INIT_NEED_CONFIG|TH_INIT_FORCE_SETUP)
37 #endif
38
 
39 /*
40 ** These are the "well-known" TH1 error messages that occur when no hook is
41 ** registered to be called prior to executing a command or processing a web
42 ** page, respectively. If one of these errors is seen, it will not be sent
43 ** or displayed to the remote user or local interactive user, respectively.
44 */
45 #define NO_COMMAND_HOOK_ERROR "no such command: command_hook"
46 #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook"
 
47
48 /*
49 ** Global variable counting the number of outstanding calls to malloc()
50 ** made by the th1 implementation. This is used to catch memory leaks
51 ** in the interpreter. Obviously, it also means th1 is not threadsafe.
@@ -1191,10 +1193,11 @@
1191 i += 2;
1192 }
1193 return i;
1194 }
1195
 
1196 /*
1197 ** This function is called by Fossil just prior to dispatching a command.
1198 ** Returning a value other than TH_OK from this function (i.e. via an
1199 ** evaluated script raising an error or calling [break]/[continue]) will
1200 ** cause the actual command execution to be skipped.
@@ -1316,10 +1319,11 @@
1316 Th_Trace("[webpage_notify {%h}] => %h<br />\n", zName,
1317 Th_ReturnCodeName(rc, 0));
1318 }
1319 return rc;
1320 }
 
1321
1322 /*
1323 ** The z[] input contains text mixed with TH1 scripts.
1324 ** The TH1 scripts are contained within <th1>...</th1>.
1325 ** TH1 variables are $aaa or $<aaa>. The first form of
@@ -1419,10 +1423,11 @@
1419 zRc = Th_ReturnCodeName(rc, 1);
1420 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
1421 Th_PrintTraceLog();
1422 }
1423
 
1424 /*
1425 ** COMMAND: test-th-hook
1426 */
1427 void test_th_hook(void){
1428 int rc = TH_OK;
@@ -1447,5 +1452,6 @@
1447 sendText(Th_ReturnCodeName(rc, 0), -1, 0);
1448 sendText("): ", -1, 0);
1449 sendText(zResult, nResult, 0);
1450 sendText("\n", -1, 0);
1451 }
 
1452
--- src/th_main.c
+++ src/th_main.c
@@ -31,21 +31,23 @@
31 #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */
32 #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */
33 #define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH commands re-added? */
34 #define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */
35 #define TH_INIT_DEFAULT (TH_INIT_NONE) /* Default flags. */
36 #define TH_INIT_HOOK (TH_INIT_NEED_CONFIG | TH_INIT_FORCE_SETUP)
37 #endif
38
39 #ifdef FOSSIL_ENABLE_TH1_HOOKS
40 /*
41 ** These are the "well-known" TH1 error messages that occur when no hook is
42 ** registered to be called prior to executing a command or processing a web
43 ** page, respectively. If one of these errors is seen, it will not be sent
44 ** or displayed to the remote user or local interactive user, respectively.
45 */
46 #define NO_COMMAND_HOOK_ERROR "no such command: command_hook"
47 #define NO_WEBPAGE_HOOK_ERROR "no such command: webpage_hook"
48 #endif
49
50 /*
51 ** Global variable counting the number of outstanding calls to malloc()
52 ** made by the th1 implementation. This is used to catch memory leaks
53 ** in the interpreter. Obviously, it also means th1 is not threadsafe.
@@ -1191,10 +1193,11 @@
1193 i += 2;
1194 }
1195 return i;
1196 }
1197
1198 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1199 /*
1200 ** This function is called by Fossil just prior to dispatching a command.
1201 ** Returning a value other than TH_OK from this function (i.e. via an
1202 ** evaluated script raising an error or calling [break]/[continue]) will
1203 ** cause the actual command execution to be skipped.
@@ -1316,10 +1319,11 @@
1319 Th_Trace("[webpage_notify {%h}] => %h<br />\n", zName,
1320 Th_ReturnCodeName(rc, 0));
1321 }
1322 return rc;
1323 }
1324 #endif
1325
1326 /*
1327 ** The z[] input contains text mixed with TH1 scripts.
1328 ** The TH1 scripts are contained within <th1>...</th1>.
1329 ** TH1 variables are $aaa or $<aaa>. The first form of
@@ -1419,10 +1423,11 @@
1423 zRc = Th_ReturnCodeName(rc, 1);
1424 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
1425 Th_PrintTraceLog();
1426 }
1427
1428 #ifdef FOSSIL_ENABLE_TH1_HOOKS
1429 /*
1430 ** COMMAND: test-th-hook
1431 */
1432 void test_th_hook(void){
1433 int rc = TH_OK;
@@ -1447,5 +1452,6 @@
1452 sendText(Th_ReturnCodeName(rc, 0), -1, 0);
1453 sendText("): ", -1, 0);
1454 sendText(zResult, nResult, 0);
1455 sendText("\n", -1, 0);
1456 }
1457 #endif
1458
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -47,10 +47,14 @@
4747
# FOSSIL_ENABLE_JSON = 1
4848
4949
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
5050
#
5151
# FOSSIL_ENABLE_SSL = 1
52
+
53
+#### Enable hooks for commands and unknown web pages via TH1
54
+#
55
+# FOSSIL_ENABLE_TH1_HOOKS = 1
5256
5357
#### Enable scripting support via Tcl/Tk
5458
#
5559
# FOSSIL_ENABLE_TCL = 1
5660
@@ -176,10 +180,16 @@
176180
# With HTTPS support
177181
ifdef FOSSIL_ENABLE_SSL
178182
TCC += -DFOSSIL_ENABLE_SSL=1
179183
RCC += -DFOSSIL_ENABLE_SSL=1
180184
endif
185
+
186
+# With TH1 hook support
187
+ifdef FOSSIL_ENABLE_TH1_HOOKS
188
+TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
189
+RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
190
+endif
181191
182192
# With Tcl support
183193
ifdef FOSSIL_ENABLE_TCL
184194
TCC += -DFOSSIL_ENABLE_TCL=1
185195
RCC += -DFOSSIL_ENABLE_TCL=1
186196
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -47,10 +47,14 @@
47 # FOSSIL_ENABLE_JSON = 1
48
49 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
50 #
51 # FOSSIL_ENABLE_SSL = 1
 
 
 
 
52
53 #### Enable scripting support via Tcl/Tk
54 #
55 # FOSSIL_ENABLE_TCL = 1
56
@@ -176,10 +180,16 @@
176 # With HTTPS support
177 ifdef FOSSIL_ENABLE_SSL
178 TCC += -DFOSSIL_ENABLE_SSL=1
179 RCC += -DFOSSIL_ENABLE_SSL=1
180 endif
 
 
 
 
 
 
181
182 # With Tcl support
183 ifdef FOSSIL_ENABLE_TCL
184 TCC += -DFOSSIL_ENABLE_TCL=1
185 RCC += -DFOSSIL_ENABLE_TCL=1
186
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -47,10 +47,14 @@
47 # FOSSIL_ENABLE_JSON = 1
48
49 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
50 #
51 # FOSSIL_ENABLE_SSL = 1
52
53 #### Enable hooks for commands and unknown web pages via TH1
54 #
55 # FOSSIL_ENABLE_TH1_HOOKS = 1
56
57 #### Enable scripting support via Tcl/Tk
58 #
59 # FOSSIL_ENABLE_TCL = 1
60
@@ -176,10 +180,16 @@
180 # With HTTPS support
181 ifdef FOSSIL_ENABLE_SSL
182 TCC += -DFOSSIL_ENABLE_SSL=1
183 RCC += -DFOSSIL_ENABLE_SSL=1
184 endif
185
186 # With TH1 hook support
187 ifdef FOSSIL_ENABLE_TH1_HOOKS
188 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
189 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
190 endif
191
192 # With Tcl support
193 ifdef FOSSIL_ENABLE_TCL
194 TCC += -DFOSSIL_ENABLE_TCL=1
195 RCC += -DFOSSIL_ENABLE_TCL=1
196
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -47,10 +47,14 @@
4747
FOSSIL_ENABLE_JSON = 1
4848
4949
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
5050
#
5151
FOSSIL_ENABLE_SSL = 1
52
+
53
+#### Enable hooks for commands and unknown web pages via TH1
54
+#
55
+FOSSIL_ENABLE_TH1_HOOKS = 1
5256
5357
#### Enable scripting support via Tcl/Tk
5458
#
5559
FOSSIL_ENABLE_TCL = 1
5660
@@ -176,10 +180,16 @@
176180
# With HTTPS support
177181
ifdef FOSSIL_ENABLE_SSL
178182
TCC += -DFOSSIL_ENABLE_SSL=1
179183
RCC += -DFOSSIL_ENABLE_SSL=1
180184
endif
185
+
186
+# With TH1 hook support
187
+ifdef FOSSIL_ENABLE_TH1_HOOKS
188
+TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
189
+RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
190
+endif
181191
182192
# With Tcl support
183193
ifdef FOSSIL_ENABLE_TCL
184194
TCC += -DFOSSIL_ENABLE_TCL=1
185195
RCC += -DFOSSIL_ENABLE_TCL=1
186196
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -47,10 +47,14 @@
47 FOSSIL_ENABLE_JSON = 1
48
49 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
50 #
51 FOSSIL_ENABLE_SSL = 1
 
 
 
 
52
53 #### Enable scripting support via Tcl/Tk
54 #
55 FOSSIL_ENABLE_TCL = 1
56
@@ -176,10 +180,16 @@
176 # With HTTPS support
177 ifdef FOSSIL_ENABLE_SSL
178 TCC += -DFOSSIL_ENABLE_SSL=1
179 RCC += -DFOSSIL_ENABLE_SSL=1
180 endif
 
 
 
 
 
 
181
182 # With Tcl support
183 ifdef FOSSIL_ENABLE_TCL
184 TCC += -DFOSSIL_ENABLE_TCL=1
185 RCC += -DFOSSIL_ENABLE_TCL=1
186
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -47,10 +47,14 @@
47 FOSSIL_ENABLE_JSON = 1
48
49 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
50 #
51 FOSSIL_ENABLE_SSL = 1
52
53 #### Enable hooks for commands and unknown web pages via TH1
54 #
55 FOSSIL_ENABLE_TH1_HOOKS = 1
56
57 #### Enable scripting support via Tcl/Tk
58 #
59 FOSSIL_ENABLE_TCL = 1
60
@@ -176,10 +180,16 @@
180 # With HTTPS support
181 ifdef FOSSIL_ENABLE_SSL
182 TCC += -DFOSSIL_ENABLE_SSL=1
183 RCC += -DFOSSIL_ENABLE_SSL=1
184 endif
185
186 # With TH1 hook support
187 ifdef FOSSIL_ENABLE_TH1_HOOKS
188 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
189 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
190 endif
191
192 # With Tcl support
193 ifdef FOSSIL_ENABLE_TCL
194 TCC += -DFOSSIL_ENABLE_TCL=1
195 RCC += -DFOSSIL_ENABLE_TCL=1
196
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -21,10 +21,13 @@
2121
# Uncomment to enable JSON API
2222
# FOSSIL_ENABLE_JSON = 1
2323
2424
# Uncomment to enable SSL support
2525
# FOSSIL_ENABLE_SSL = 1
26
+
27
+# Uncomment to enable TH1 hooks
28
+# FOSSIL_ENABLE_TH1_HOOKS = 1
2629
2730
# Uncomment to enable Tcl support
2831
# FOSSIL_ENABLE_TCL = 1
2932
3033
!ifdef FOSSIL_ENABLE_SSL
@@ -79,10 +82,15 @@
7982
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
8083
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
8184
LIBS = $(LIBS) $(SSLLIB)
8285
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
8386
!endif
87
+
88
+!ifdef FOSSIL_ENABLE_TH1_HOOKS
89
+TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
90
+RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
91
+!endif
8492
8593
!ifdef FOSSIL_ENABLE_TCL
8694
TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
8795
RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
8896
TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
8997
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -21,10 +21,13 @@
21 # Uncomment to enable JSON API
22 # FOSSIL_ENABLE_JSON = 1
23
24 # Uncomment to enable SSL support
25 # FOSSIL_ENABLE_SSL = 1
 
 
 
26
27 # Uncomment to enable Tcl support
28 # FOSSIL_ENABLE_TCL = 1
29
30 !ifdef FOSSIL_ENABLE_SSL
@@ -79,10 +82,15 @@
79 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
80 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
81 LIBS = $(LIBS) $(SSLLIB)
82 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
83 !endif
 
 
 
 
 
84
85 !ifdef FOSSIL_ENABLE_TCL
86 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
87 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
88 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
89
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -21,10 +21,13 @@
21 # Uncomment to enable JSON API
22 # FOSSIL_ENABLE_JSON = 1
23
24 # Uncomment to enable SSL support
25 # FOSSIL_ENABLE_SSL = 1
26
27 # Uncomment to enable TH1 hooks
28 # FOSSIL_ENABLE_TH1_HOOKS = 1
29
30 # Uncomment to enable Tcl support
31 # FOSSIL_ENABLE_TCL = 1
32
33 !ifdef FOSSIL_ENABLE_SSL
@@ -79,10 +82,15 @@
82 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
83 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
84 LIBS = $(LIBS) $(SSLLIB)
85 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
86 !endif
87
88 !ifdef FOSSIL_ENABLE_TH1_HOOKS
89 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
90 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
91 !endif
92
93 !ifdef FOSSIL_ENABLE_TCL
94 TCC = $(TCC) /DFOSSIL_ENABLE_TCL=1
95 RCC = $(RCC) /DFOSSIL_ENABLE_TCL=1
96 TCC = $(TCC) /DFOSSIL_ENABLE_TCL_STUBS=1
97
--- win/fossil.rc
+++ win/fossil.rc
@@ -101,10 +101,15 @@
101101
VALUE "CommandLineIsUnicode", "Yes\0"
102102
#endif /* defined(BROKEN_MINGW_CMDLINE) */
103103
#if defined(FOSSIL_ENABLE_SSL)
104104
VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
105105
#endif /* defined(FOSSIL_ENABLE_SSL) */
106
+#if defined(FOSSIL_ENABLE_TH1_HOOKS)
107
+ VALUE "Th1Hooks", "Yes\0"
108
+#else
109
+ VALUE "Th1Hooks", "No\0"
110
+#endif
106111
#if defined(FOSSIL_ENABLE_TCL)
107112
VALUE "TclEnabled", "Yes, Tcl " TCL_PATCH_LEVEL "\0"
108113
#if defined(USE_TCL_STUBS)
109114
VALUE "UseTclStubsEnabled", "Yes\0"
110115
#else
111116
--- win/fossil.rc
+++ win/fossil.rc
@@ -101,10 +101,15 @@
101 VALUE "CommandLineIsUnicode", "Yes\0"
102 #endif /* defined(BROKEN_MINGW_CMDLINE) */
103 #if defined(FOSSIL_ENABLE_SSL)
104 VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
105 #endif /* defined(FOSSIL_ENABLE_SSL) */
 
 
 
 
 
106 #if defined(FOSSIL_ENABLE_TCL)
107 VALUE "TclEnabled", "Yes, Tcl " TCL_PATCH_LEVEL "\0"
108 #if defined(USE_TCL_STUBS)
109 VALUE "UseTclStubsEnabled", "Yes\0"
110 #else
111
--- win/fossil.rc
+++ win/fossil.rc
@@ -101,10 +101,15 @@
101 VALUE "CommandLineIsUnicode", "Yes\0"
102 #endif /* defined(BROKEN_MINGW_CMDLINE) */
103 #if defined(FOSSIL_ENABLE_SSL)
104 VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
105 #endif /* defined(FOSSIL_ENABLE_SSL) */
106 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
107 VALUE "Th1Hooks", "Yes\0"
108 #else
109 VALUE "Th1Hooks", "No\0"
110 #endif
111 #if defined(FOSSIL_ENABLE_TCL)
112 VALUE "TclEnabled", "Yes, Tcl " TCL_PATCH_LEVEL "\0"
113 #if defined(USE_TCL_STUBS)
114 VALUE "UseTclStubsEnabled", "Yes\0"
115 #else
116

Keyboard Shortcuts

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