Fossil SCM

Add support for using TH1 for embedded documentation files. Disabled by default at compile-time and at runtime.

mistachkin 2014-09-10 18:37 trunk merge
Commit c91bafccb5ee558095d53b9d95afbfc9359e22e4
+7
--- auto.def
+++ auto.def
@@ -5,10 +5,11 @@
55
options {
66
with-openssl:path|auto|none
77
=> {Look for OpenSSL in the given path, or auto or none}
88
with-miniz=0 => {Use miniz from the source tree}
99
with-zlib:path => {Look for zlib in the given path}
10
+ with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1011
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
1112
with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
1213
with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
1314
with-tcl-private-stubs=0
1415
=> {Enable Tcl integration via private stubs mechanism}
@@ -84,10 +85,16 @@
8485
# reading config.h first.
8586
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
8687
define FOSSIL_ENABLE_JSON
8788
msg-result "JSON support enabled"
8889
}
90
+
91
+if {[opt-bool with-th1-docs]} {
92
+ define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
93
+ define FOSSIL_ENABLE_TH1_DOCS
94
+ msg-result "TH1 embedded documentation support enabled"
95
+}
8996
9097
if {[opt-bool with-th1-hooks]} {
9198
define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_HOOKS
9299
define FOSSIL_ENABLE_TH1_HOOKS
93100
msg-result "TH1 hooks support enabled"
94101
--- auto.def
+++ auto.def
@@ -5,10 +5,11 @@
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path => {Look for zlib in the given path}
 
10 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
11 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
12 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
13 with-tcl-private-stubs=0
14 => {Enable Tcl integration via private stubs mechanism}
@@ -84,10 +85,16 @@
84 # reading config.h first.
85 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
86 define FOSSIL_ENABLE_JSON
87 msg-result "JSON support enabled"
88 }
 
 
 
 
 
 
89
90 if {[opt-bool with-th1-hooks]} {
91 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_HOOKS
92 define FOSSIL_ENABLE_TH1_HOOKS
93 msg-result "TH1 hooks support enabled"
94
--- auto.def
+++ auto.def
@@ -5,10 +5,11 @@
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path => {Look for zlib in the given path}
10 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
11 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
12 with-tcl:path => {Enable Tcl integration, with Tcl in the specified path}
13 with-tcl-stubs=0 => {Enable Tcl integration via stubs library mechanism}
14 with-tcl-private-stubs=0
15 => {Enable Tcl integration via private stubs mechanism}
@@ -84,10 +85,16 @@
85 # reading config.h first.
86 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_JSON
87 define FOSSIL_ENABLE_JSON
88 msg-result "JSON support enabled"
89 }
90
91 if {[opt-bool with-th1-docs]} {
92 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_DOCS
93 define FOSSIL_ENABLE_TH1_DOCS
94 msg-result "TH1 embedded documentation support enabled"
95 }
96
97 if {[opt-bool with-th1-hooks]} {
98 define-append EXTRA_CFLAGS -DFOSSIL_ENABLE_TH1_HOOKS
99 define FOSSIL_ENABLE_TH1_HOOKS
100 msg-result "TH1 hooks support enabled"
101
--- src/configure.c
+++ src/configure.c
@@ -97,10 +97,13 @@
9797
{ "timeline-max-comment", CONFIGSET_SKIN },
9898
{ "timeline-plaintext", CONFIGSET_SKIN },
9999
{ "adunit", CONFIGSET_SKIN },
100100
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
101101
{ "adunit-omit-if-user", CONFIGSET_SKIN },
102
+#ifdef FOSSIL_ENABLE_TH1_DOCS
103
+ { "th1-docs", CONFIGSET_TH1 },
104
+#endif
102105
#ifdef FOSSIL_ENABLE_TH1_HOOKS
103106
{ "th1-hooks", CONFIGSET_TH1 },
104107
#endif
105108
{ "th1-setup", CONFIGSET_TH1 },
106109
{ "th1-uri-regexp", CONFIGSET_TH1 },
107110
--- src/configure.c
+++ src/configure.c
@@ -97,10 +97,13 @@
97 { "timeline-max-comment", CONFIGSET_SKIN },
98 { "timeline-plaintext", CONFIGSET_SKIN },
99 { "adunit", CONFIGSET_SKIN },
100 { "adunit-omit-if-admin", CONFIGSET_SKIN },
101 { "adunit-omit-if-user", CONFIGSET_SKIN },
 
 
 
102 #ifdef FOSSIL_ENABLE_TH1_HOOKS
103 { "th1-hooks", CONFIGSET_TH1 },
104 #endif
105 { "th1-setup", CONFIGSET_TH1 },
106 { "th1-uri-regexp", CONFIGSET_TH1 },
107
--- src/configure.c
+++ src/configure.c
@@ -97,10 +97,13 @@
97 { "timeline-max-comment", CONFIGSET_SKIN },
98 { "timeline-plaintext", CONFIGSET_SKIN },
99 { "adunit", CONFIGSET_SKIN },
100 { "adunit-omit-if-admin", CONFIGSET_SKIN },
101 { "adunit-omit-if-user", CONFIGSET_SKIN },
102 #ifdef FOSSIL_ENABLE_TH1_DOCS
103 { "th1-docs", CONFIGSET_TH1 },
104 #endif
105 #ifdef FOSSIL_ENABLE_TH1_HOOKS
106 { "th1-hooks", CONFIGSET_TH1 },
107 #endif
108 { "th1-setup", CONFIGSET_TH1 },
109 { "th1-uri-regexp", CONFIGSET_TH1 },
110
+13
--- src/db.c
+++ src/db.c
@@ -2201,10 +2201,13 @@
22012201
{ "ssl-identity", 0, 40, 0, 0, "" },
22022202
#ifdef FOSSIL_ENABLE_TCL
22032203
{ "tcl", 0, 0, 0, 0, "off" },
22042204
{ "tcl-setup", 0, 40, 1, 1, "" },
22052205
#endif
2206
+#ifdef FOSSIL_ENABLE_TH1_DOCS
2207
+ { "th1-docs", 0, 0, 0, 0, "off" },
2208
+#endif
22062209
#ifdef FOSSIL_ENABLE_TH1_HOOKS
22072210
{ "th1-hooks", 0, 0, 0, 0, "off" },
22082211
#endif
22092212
{ "th1-setup", 0, 40, 1, 1, "" },
22102213
{ "th1-uri-regexp", 0, 40, 1, 0, "" },
@@ -2410,10 +2413,20 @@
24102413
** expressions and scripts. Default: off.
24112414
**
24122415
** tcl-setup This is the setup script to be evaluated after creating
24132416
** (versionable) and initializing the Tcl interpreter. By default, this
24142417
** is empty and no extra setup is performed.
2418
+**
2419
+** th1-docs WARNING: If enabled (and Fossil was compiled with TH1
2420
+** support for embedded documentation files), this allows
2421
+** embedded documentation files to contain arbitrary TH1
2422
+** scripts that are evaluated on the server. If native
2423
+** Tcl integration is also enabled, this setting has the
2424
+** potential to allow anybody with check-in privileges to
2425
+** do almost anything that the associated operating system
2426
+** user account could do. Extreme caution should be used
2427
+** when enabling this setting. Default: off.
24152428
**
24162429
** th1-hooks If enabled (and Fossil was compiled with support for TH1
24172430
** hooks), special TH1 commands will be called before and
24182431
** after any Fossil command or web page. Default: off.
24192432
**
24202433
--- src/db.c
+++ src/db.c
@@ -2201,10 +2201,13 @@
2201 { "ssl-identity", 0, 40, 0, 0, "" },
2202 #ifdef FOSSIL_ENABLE_TCL
2203 { "tcl", 0, 0, 0, 0, "off" },
2204 { "tcl-setup", 0, 40, 1, 1, "" },
2205 #endif
 
 
 
2206 #ifdef FOSSIL_ENABLE_TH1_HOOKS
2207 { "th1-hooks", 0, 0, 0, 0, "off" },
2208 #endif
2209 { "th1-setup", 0, 40, 1, 1, "" },
2210 { "th1-uri-regexp", 0, 40, 1, 0, "" },
@@ -2410,10 +2413,20 @@
2410 ** expressions and scripts. Default: off.
2411 **
2412 ** tcl-setup This is the setup script to be evaluated after creating
2413 ** (versionable) and initializing the Tcl interpreter. By default, this
2414 ** is empty and no extra setup is performed.
 
 
 
 
 
 
 
 
 
 
2415 **
2416 ** th1-hooks If enabled (and Fossil was compiled with support for TH1
2417 ** hooks), special TH1 commands will be called before and
2418 ** after any Fossil command or web page. Default: off.
2419 **
2420
--- src/db.c
+++ src/db.c
@@ -2201,10 +2201,13 @@
2201 { "ssl-identity", 0, 40, 0, 0, "" },
2202 #ifdef FOSSIL_ENABLE_TCL
2203 { "tcl", 0, 0, 0, 0, "off" },
2204 { "tcl-setup", 0, 40, 1, 1, "" },
2205 #endif
2206 #ifdef FOSSIL_ENABLE_TH1_DOCS
2207 { "th1-docs", 0, 0, 0, 0, "off" },
2208 #endif
2209 #ifdef FOSSIL_ENABLE_TH1_HOOKS
2210 { "th1-hooks", 0, 0, 0, 0, "off" },
2211 #endif
2212 { "th1-setup", 0, 40, 1, 1, "" },
2213 { "th1-uri-regexp", 0, 40, 1, 0, "" },
@@ -2410,10 +2413,20 @@
2413 ** expressions and scripts. Default: off.
2414 **
2415 ** tcl-setup This is the setup script to be evaluated after creating
2416 ** (versionable) and initializing the Tcl interpreter. By default, this
2417 ** is empty and no extra setup is performed.
2418 **
2419 ** th1-docs WARNING: If enabled (and Fossil was compiled with TH1
2420 ** support for embedded documentation files), this allows
2421 ** embedded documentation files to contain arbitrary TH1
2422 ** scripts that are evaluated on the server. If native
2423 ** Tcl integration is also enabled, this setting has the
2424 ** potential to allow anybody with check-in privileges to
2425 ** do almost anything that the associated operating system
2426 ** user account could do. Extreme caution should be used
2427 ** when enabling this setting. Default: off.
2428 **
2429 ** th1-hooks If enabled (and Fossil was compiled with support for TH1
2430 ** hooks), special TH1 commands will be called before and
2431 ** after any Fossil command or web page. Default: off.
2432 **
2433
+10
--- src/doc.c
+++ src/doc.c
@@ -256,10 +256,11 @@
256256
{ "tcl", 3, "application/x-tcl" },
257257
{ "tex", 3, "application/x-tex" },
258258
{ "texi", 4, "application/x-texinfo" },
259259
{ "texinfo", 7, "application/x-texinfo" },
260260
{ "tgz", 3, "application/x-tar-gz" },
261
+ { "th1", 3, "application/x-th1" },
261262
{ "tif", 3, "image/tiff" },
262263
{ "tiff", 4, "image/tiff" },
263264
{ "tr", 2, "application/x-troff" },
264265
{ "tsi", 3, "audio/TSP-audio" },
265266
{ "tsp", 3, "application/dsptype" },
@@ -524,10 +525,19 @@
524525
style_header("Documentation");
525526
@ <blockquote><pre>
526527
@ %h(blob_str(&filebody))
527528
@ </pre></blockquote>
528529
style_footer();
530
+#ifdef FOSSIL_ENABLE_TH1_DOCS
531
+ }else if( db_get_boolean("th1-docs", 0) &&
532
+ fossil_strcmp(zMime, "application/x-th1")==0 ){
533
+ char *zHtml = htmlize(zName, -1);
534
+ style_header(zHtml);
535
+ Th_Render(blob_str(&filebody));
536
+ style_footer();
537
+ fossil_free(zHtml);
538
+#endif
529539
}else{
530540
cgi_set_content_type(zMime);
531541
cgi_set_content(&filebody);
532542
}
533543
return;
534544
--- src/doc.c
+++ src/doc.c
@@ -256,10 +256,11 @@
256 { "tcl", 3, "application/x-tcl" },
257 { "tex", 3, "application/x-tex" },
258 { "texi", 4, "application/x-texinfo" },
259 { "texinfo", 7, "application/x-texinfo" },
260 { "tgz", 3, "application/x-tar-gz" },
 
261 { "tif", 3, "image/tiff" },
262 { "tiff", 4, "image/tiff" },
263 { "tr", 2, "application/x-troff" },
264 { "tsi", 3, "audio/TSP-audio" },
265 { "tsp", 3, "application/dsptype" },
@@ -524,10 +525,19 @@
524 style_header("Documentation");
525 @ <blockquote><pre>
526 @ %h(blob_str(&filebody))
527 @ </pre></blockquote>
528 style_footer();
 
 
 
 
 
 
 
 
 
529 }else{
530 cgi_set_content_type(zMime);
531 cgi_set_content(&filebody);
532 }
533 return;
534
--- src/doc.c
+++ src/doc.c
@@ -256,10 +256,11 @@
256 { "tcl", 3, "application/x-tcl" },
257 { "tex", 3, "application/x-tex" },
258 { "texi", 4, "application/x-texinfo" },
259 { "texinfo", 7, "application/x-texinfo" },
260 { "tgz", 3, "application/x-tar-gz" },
261 { "th1", 3, "application/x-th1" },
262 { "tif", 3, "image/tiff" },
263 { "tiff", 4, "image/tiff" },
264 { "tr", 2, "application/x-troff" },
265 { "tsi", 3, "audio/TSP-audio" },
266 { "tsp", 3, "application/dsptype" },
@@ -524,10 +525,19 @@
525 style_header("Documentation");
526 @ <blockquote><pre>
527 @ %h(blob_str(&filebody))
528 @ </pre></blockquote>
529 style_footer();
530 #ifdef FOSSIL_ENABLE_TH1_DOCS
531 }else if( db_get_boolean("th1-docs", 0) &&
532 fossil_strcmp(zMime, "application/x-th1")==0 ){
533 char *zHtml = htmlize(zName, -1);
534 style_header(zHtml);
535 Th_Render(blob_str(&filebody));
536 style_footer();
537 fossil_free(zHtml);
538 #endif
539 }else{
540 cgi_set_content_type(zMime);
541 cgi_set_content(&filebody);
542 }
543 return;
544
+3
--- src/main.c
+++ src/main.c
@@ -975,10 +975,13 @@
975975
#else
976976
fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
977977
#endif
978978
#if defined(FOSSIL_ENABLE_SSL)
979979
fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
980
+#endif
981
+#if defined(FOSSIL_ENABLE_TH1_DOCS)
982
+ fossil_print("TH1_DOCS\n");
980983
#endif
981984
#if defined(FOSSIL_ENABLE_TH1_HOOKS)
982985
fossil_print("TH1_HOOKS\n");
983986
#endif
984987
#if defined(FOSSIL_ENABLE_TCL)
985988
--- src/main.c
+++ src/main.c
@@ -975,10 +975,13 @@
975 #else
976 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
977 #endif
978 #if defined(FOSSIL_ENABLE_SSL)
979 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
 
 
 
980 #endif
981 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
982 fossil_print("TH1_HOOKS\n");
983 #endif
984 #if defined(FOSSIL_ENABLE_TCL)
985
--- src/main.c
+++ src/main.c
@@ -975,10 +975,13 @@
975 #else
976 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
977 #endif
978 #if defined(FOSSIL_ENABLE_SSL)
979 fossil_print("SSL (%s)\n", SSLeay_version(SSLEAY_VERSION));
980 #endif
981 #if defined(FOSSIL_ENABLE_TH1_DOCS)
982 fossil_print("TH1_DOCS\n");
983 #endif
984 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
985 fossil_print("TH1_HOOKS\n");
986 #endif
987 #if defined(FOSSIL_ENABLE_TCL)
988
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -444,10 +444,14 @@
444444
445445
#### Automatically build OpenSSL when building Fossil (causes rebuild
446446
# issues when building incrementally).
447447
#
448448
# FOSSIL_BUILD_SSL = 1
449
+
450
+#### Enable TH1 scripts in embedded documentation files
451
+#
452
+# FOSSIL_ENABLE_TH1_DOCS = 1
449453
450454
#### Enable hooks for commands and web pages via TH1
451455
#
452456
# FOSSIL_ENABLE_TH1_HOOKS = 1
453457
@@ -597,10 +601,16 @@
597601
# With HTTPS support
598602
ifdef FOSSIL_ENABLE_SSL
599603
TCC += -DFOSSIL_ENABLE_SSL=1
600604
RCC += -DFOSSIL_ENABLE_SSL=1
601605
endif
606
+
607
+# With TH1 embedded docs support
608
+ifdef FOSSIL_ENABLE_TH1_DOCS
609
+TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
610
+RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
611
+endif
602612
603613
# With TH1 hook support
604614
ifdef FOSSIL_ENABLE_TH1_HOOKS
605615
TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
606616
RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
@@ -1157,10 +1167,13 @@
11571167
# Uncomment to enable miniz usage
11581168
# FOSSIL_ENABLE_MINIZ = 1
11591169
11601170
# Uncomment to enable SSL support
11611171
# FOSSIL_ENABLE_SSL = 1
1172
+
1173
+# Uncomment to enable TH1 scripts in embedded documentation files
1174
+# FOSSIL_ENABLE_TH1_DOCS = 1
11621175
11631176
# Uncomment to enable TH1 hooks
11641177
# FOSSIL_ENABLE_TH1_HOOKS = 1
11651178
11661179
# Uncomment to enable Tcl support
@@ -1233,10 +1246,15 @@
12331246
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
12341247
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
12351248
LIBS = $(LIBS) $(SSLLIB)
12361249
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
12371250
!endif
1251
+
1252
+!ifdef FOSSIL_ENABLE_TH1_DOCS
1253
+TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1254
+RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1255
+!endif
12381256
12391257
!ifdef FOSSIL_ENABLE_TH1_HOOKS
12401258
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
12411259
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
12421260
!endif
12431261
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -444,10 +444,14 @@
444
445 #### Automatically build OpenSSL when building Fossil (causes rebuild
446 # issues when building incrementally).
447 #
448 # FOSSIL_BUILD_SSL = 1
 
 
 
 
449
450 #### Enable hooks for commands and web pages via TH1
451 #
452 # FOSSIL_ENABLE_TH1_HOOKS = 1
453
@@ -597,10 +601,16 @@
597 # With HTTPS support
598 ifdef FOSSIL_ENABLE_SSL
599 TCC += -DFOSSIL_ENABLE_SSL=1
600 RCC += -DFOSSIL_ENABLE_SSL=1
601 endif
 
 
 
 
 
 
602
603 # With TH1 hook support
604 ifdef FOSSIL_ENABLE_TH1_HOOKS
605 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
606 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
@@ -1157,10 +1167,13 @@
1157 # Uncomment to enable miniz usage
1158 # FOSSIL_ENABLE_MINIZ = 1
1159
1160 # Uncomment to enable SSL support
1161 # FOSSIL_ENABLE_SSL = 1
 
 
 
1162
1163 # Uncomment to enable TH1 hooks
1164 # FOSSIL_ENABLE_TH1_HOOKS = 1
1165
1166 # Uncomment to enable Tcl support
@@ -1233,10 +1246,15 @@
1233 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1234 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1235 LIBS = $(LIBS) $(SSLLIB)
1236 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1237 !endif
 
 
 
 
 
1238
1239 !ifdef FOSSIL_ENABLE_TH1_HOOKS
1240 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1241 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1242 !endif
1243
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -444,10 +444,14 @@
444
445 #### Automatically build OpenSSL when building Fossil (causes rebuild
446 # issues when building incrementally).
447 #
448 # FOSSIL_BUILD_SSL = 1
449
450 #### Enable TH1 scripts in embedded documentation files
451 #
452 # FOSSIL_ENABLE_TH1_DOCS = 1
453
454 #### Enable hooks for commands and web pages via TH1
455 #
456 # FOSSIL_ENABLE_TH1_HOOKS = 1
457
@@ -597,10 +601,16 @@
601 # With HTTPS support
602 ifdef FOSSIL_ENABLE_SSL
603 TCC += -DFOSSIL_ENABLE_SSL=1
604 RCC += -DFOSSIL_ENABLE_SSL=1
605 endif
606
607 # With TH1 embedded docs support
608 ifdef FOSSIL_ENABLE_TH1_DOCS
609 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
610 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
611 endif
612
613 # With TH1 hook support
614 ifdef FOSSIL_ENABLE_TH1_HOOKS
615 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
616 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
@@ -1157,10 +1167,13 @@
1167 # Uncomment to enable miniz usage
1168 # FOSSIL_ENABLE_MINIZ = 1
1169
1170 # Uncomment to enable SSL support
1171 # FOSSIL_ENABLE_SSL = 1
1172
1173 # Uncomment to enable TH1 scripts in embedded documentation files
1174 # FOSSIL_ENABLE_TH1_DOCS = 1
1175
1176 # Uncomment to enable TH1 hooks
1177 # FOSSIL_ENABLE_TH1_HOOKS = 1
1178
1179 # Uncomment to enable Tcl support
@@ -1233,10 +1246,15 @@
1246 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
1247 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
1248 LIBS = $(LIBS) $(SSLLIB)
1249 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
1250 !endif
1251
1252 !ifdef FOSSIL_ENABLE_TH1_DOCS
1253 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1254 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
1255 !endif
1256
1257 !ifdef FOSSIL_ENABLE_TH1_HOOKS
1258 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1259 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
1260 !endif
1261
--- src/th_main.c
+++ src/th_main.c
@@ -373,10 +373,11 @@
373373
**
374374
** Return true if the fossil binary has the given compile-time feature
375375
** enabled. The set of features includes:
376376
**
377377
** "ssl" = FOSSIL_ENABLE_SSL
378
+** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
378379
** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
379380
** "tcl" = FOSSIL_ENABLE_TCL
380381
** "useTclStubs" = USE_TCL_STUBS
381382
** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
382383
** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS
@@ -402,10 +403,15 @@
402403
}
403404
#if defined(FOSSIL_ENABLE_SSL)
404405
else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){
405406
rc = 1;
406407
}
408
+#endif
409
+#if defined(FOSSIL_ENABLE_TH1_DOCS)
410
+ else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
411
+ rc = 1;
412
+ }
407413
#endif
408414
#if defined(FOSSIL_ENABLE_TH1_HOOKS)
409415
else if( 0 == fossil_strnicmp( zArg, "th1Hooks\0", 9 ) ){
410416
rc = 1;
411417
}
412418
--- src/th_main.c
+++ src/th_main.c
@@ -373,10 +373,11 @@
373 **
374 ** Return true if the fossil binary has the given compile-time feature
375 ** enabled. The set of features includes:
376 **
377 ** "ssl" = FOSSIL_ENABLE_SSL
 
378 ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
379 ** "tcl" = FOSSIL_ENABLE_TCL
380 ** "useTclStubs" = USE_TCL_STUBS
381 ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
382 ** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS
@@ -402,10 +403,15 @@
402 }
403 #if defined(FOSSIL_ENABLE_SSL)
404 else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){
405 rc = 1;
406 }
 
 
 
 
 
407 #endif
408 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
409 else if( 0 == fossil_strnicmp( zArg, "th1Hooks\0", 9 ) ){
410 rc = 1;
411 }
412
--- src/th_main.c
+++ src/th_main.c
@@ -373,10 +373,11 @@
373 **
374 ** Return true if the fossil binary has the given compile-time feature
375 ** enabled. The set of features includes:
376 **
377 ** "ssl" = FOSSIL_ENABLE_SSL
378 ** "th1Docs" = FOSSIL_ENABLE_TH1_DOCS
379 ** "th1Hooks" = FOSSIL_ENABLE_TH1_HOOKS
380 ** "tcl" = FOSSIL_ENABLE_TCL
381 ** "useTclStubs" = USE_TCL_STUBS
382 ** "tclStubs" = FOSSIL_ENABLE_TCL_STUBS
383 ** "tclPrivateStubs" = FOSSIL_ENABLE_TCL_PRIVATE_STUBS
@@ -402,10 +403,15 @@
403 }
404 #if defined(FOSSIL_ENABLE_SSL)
405 else if( 0 == fossil_strnicmp( zArg, "ssl\0", 4 ) ){
406 rc = 1;
407 }
408 #endif
409 #if defined(FOSSIL_ENABLE_TH1_DOCS)
410 else if( 0 == fossil_strnicmp( zArg, "th1Docs\0", 8 ) ){
411 rc = 1;
412 }
413 #endif
414 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
415 else if( 0 == fossil_strnicmp( zArg, "th1Hooks\0", 9 ) ){
416 rc = 1;
417 }
418
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -52,10 +52,14 @@
5252
5353
#### Automatically build OpenSSL when building Fossil (causes rebuild
5454
# issues when building incrementally).
5555
#
5656
# FOSSIL_BUILD_SSL = 1
57
+
58
+#### Enable TH1 scripts in embedded documentation files
59
+#
60
+# FOSSIL_ENABLE_TH1_DOCS = 1
5761
5862
#### Enable hooks for commands and web pages via TH1
5963
#
6064
# FOSSIL_ENABLE_TH1_HOOKS = 1
6165
@@ -205,10 +209,16 @@
205209
# With HTTPS support
206210
ifdef FOSSIL_ENABLE_SSL
207211
TCC += -DFOSSIL_ENABLE_SSL=1
208212
RCC += -DFOSSIL_ENABLE_SSL=1
209213
endif
214
+
215
+# With TH1 embedded docs support
216
+ifdef FOSSIL_ENABLE_TH1_DOCS
217
+TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
218
+RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
219
+endif
210220
211221
# With TH1 hook support
212222
ifdef FOSSIL_ENABLE_TH1_HOOKS
213223
TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
214224
RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
215225
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
 
 
 
 
57
58 #### Enable hooks for commands and web pages via TH1
59 #
60 # FOSSIL_ENABLE_TH1_HOOKS = 1
61
@@ -205,10 +209,16 @@
205 # With HTTPS support
206 ifdef FOSSIL_ENABLE_SSL
207 TCC += -DFOSSIL_ENABLE_SSL=1
208 RCC += -DFOSSIL_ENABLE_SSL=1
209 endif
 
 
 
 
 
 
210
211 # With TH1 hook support
212 ifdef FOSSIL_ENABLE_TH1_HOOKS
213 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
214 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
215
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
57
58 #### Enable TH1 scripts in embedded documentation files
59 #
60 # FOSSIL_ENABLE_TH1_DOCS = 1
61
62 #### Enable hooks for commands and web pages via TH1
63 #
64 # FOSSIL_ENABLE_TH1_HOOKS = 1
65
@@ -205,10 +209,16 @@
209 # With HTTPS support
210 ifdef FOSSIL_ENABLE_SSL
211 TCC += -DFOSSIL_ENABLE_SSL=1
212 RCC += -DFOSSIL_ENABLE_SSL=1
213 endif
214
215 # With TH1 embedded docs support
216 ifdef FOSSIL_ENABLE_TH1_DOCS
217 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
218 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
219 endif
220
221 # With TH1 hook support
222 ifdef FOSSIL_ENABLE_TH1_HOOKS
223 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
224 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
225
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -52,10 +52,14 @@
5252
5353
#### Automatically build OpenSSL when building Fossil (causes rebuild
5454
# issues when building incrementally).
5555
#
5656
# FOSSIL_BUILD_SSL = 1
57
+
58
+#### Enable TH1 scripts in embedded documentation files
59
+#
60
+# FOSSIL_ENABLE_TH1_DOCS = 1
5761
5862
#### Enable hooks for commands and web pages via TH1
5963
#
6064
FOSSIL_ENABLE_TH1_HOOKS = 1
6165
@@ -205,10 +209,16 @@
205209
# With HTTPS support
206210
ifdef FOSSIL_ENABLE_SSL
207211
TCC += -DFOSSIL_ENABLE_SSL=1
208212
RCC += -DFOSSIL_ENABLE_SSL=1
209213
endif
214
+
215
+# With TH1 embedded docs support
216
+ifdef FOSSIL_ENABLE_TH1_DOCS
217
+TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
218
+RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
219
+endif
210220
211221
# With TH1 hook support
212222
ifdef FOSSIL_ENABLE_TH1_HOOKS
213223
TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
214224
RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
215225
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
 
 
 
 
57
58 #### Enable hooks for commands and web pages via TH1
59 #
60 FOSSIL_ENABLE_TH1_HOOKS = 1
61
@@ -205,10 +209,16 @@
205 # With HTTPS support
206 ifdef FOSSIL_ENABLE_SSL
207 TCC += -DFOSSIL_ENABLE_SSL=1
208 RCC += -DFOSSIL_ENABLE_SSL=1
209 endif
 
 
 
 
 
 
210
211 # With TH1 hook support
212 ifdef FOSSIL_ENABLE_TH1_HOOKS
213 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
214 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
215
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -52,10 +52,14 @@
52
53 #### Automatically build OpenSSL when building Fossil (causes rebuild
54 # issues when building incrementally).
55 #
56 # FOSSIL_BUILD_SSL = 1
57
58 #### Enable TH1 scripts in embedded documentation files
59 #
60 # FOSSIL_ENABLE_TH1_DOCS = 1
61
62 #### Enable hooks for commands and web pages via TH1
63 #
64 FOSSIL_ENABLE_TH1_HOOKS = 1
65
@@ -205,10 +209,16 @@
209 # With HTTPS support
210 ifdef FOSSIL_ENABLE_SSL
211 TCC += -DFOSSIL_ENABLE_SSL=1
212 RCC += -DFOSSIL_ENABLE_SSL=1
213 endif
214
215 # With TH1 embedded docs support
216 ifdef FOSSIL_ENABLE_TH1_DOCS
217 TCC += -DFOSSIL_ENABLE_TH1_DOCS=1
218 RCC += -DFOSSIL_ENABLE_TH1_DOCS=1
219 endif
220
221 # With TH1 hook support
222 ifdef FOSSIL_ENABLE_TH1_HOOKS
223 TCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
224 RCC += -DFOSSIL_ENABLE_TH1_HOOKS=1
225
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -26,10 +26,13 @@
2626
# Uncomment to enable miniz usage
2727
# FOSSIL_ENABLE_MINIZ = 1
2828
2929
# Uncomment to enable SSL support
3030
# FOSSIL_ENABLE_SSL = 1
31
+
32
+# Uncomment to enable TH1 scripts in embedded documentation files
33
+# FOSSIL_ENABLE_TH1_DOCS = 1
3134
3235
# Uncomment to enable TH1 hooks
3336
# FOSSIL_ENABLE_TH1_HOOKS = 1
3437
3538
# Uncomment to enable Tcl support
@@ -102,10 +105,15 @@
102105
TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
103106
RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
104107
LIBS = $(LIBS) $(SSLLIB)
105108
LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
106109
!endif
110
+
111
+!ifdef FOSSIL_ENABLE_TH1_DOCS
112
+TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
113
+RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
114
+!endif
107115
108116
!ifdef FOSSIL_ENABLE_TH1_HOOKS
109117
TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
110118
RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
111119
!endif
112120
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -26,10 +26,13 @@
26 # Uncomment to enable miniz usage
27 # FOSSIL_ENABLE_MINIZ = 1
28
29 # Uncomment to enable SSL support
30 # FOSSIL_ENABLE_SSL = 1
 
 
 
31
32 # Uncomment to enable TH1 hooks
33 # FOSSIL_ENABLE_TH1_HOOKS = 1
34
35 # Uncomment to enable Tcl support
@@ -102,10 +105,15 @@
102 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
103 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
104 LIBS = $(LIBS) $(SSLLIB)
105 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
106 !endif
 
 
 
 
 
107
108 !ifdef FOSSIL_ENABLE_TH1_HOOKS
109 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
110 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
111 !endif
112
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -26,10 +26,13 @@
26 # Uncomment to enable miniz usage
27 # FOSSIL_ENABLE_MINIZ = 1
28
29 # Uncomment to enable SSL support
30 # FOSSIL_ENABLE_SSL = 1
31
32 # Uncomment to enable TH1 scripts in embedded documentation files
33 # FOSSIL_ENABLE_TH1_DOCS = 1
34
35 # Uncomment to enable TH1 hooks
36 # FOSSIL_ENABLE_TH1_HOOKS = 1
37
38 # Uncomment to enable Tcl support
@@ -102,10 +105,15 @@
105 TCC = $(TCC) /DFOSSIL_ENABLE_SSL=1
106 RCC = $(RCC) /DFOSSIL_ENABLE_SSL=1
107 LIBS = $(LIBS) $(SSLLIB)
108 LIBDIR = $(LIBDIR) /LIBPATH:$(SSLLIBDIR)
109 !endif
110
111 !ifdef FOSSIL_ENABLE_TH1_DOCS
112 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_DOCS=1
113 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_DOCS=1
114 !endif
115
116 !ifdef FOSSIL_ENABLE_TH1_HOOKS
117 TCC = $(TCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
118 RCC = $(RCC) /DFOSSIL_ENABLE_TH1_HOOKS=1
119 !endif
120
--- win/fossil.rc
+++ win/fossil.rc
@@ -115,10 +115,15 @@
115115
VALUE "CommandLineIsUnicode", "Yes\0"
116116
#endif /* defined(BROKEN_MINGW_CMDLINE) */
117117
#if defined(FOSSIL_ENABLE_SSL)
118118
VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
119119
#endif /* defined(FOSSIL_ENABLE_SSL) */
120
+#if defined(FOSSIL_ENABLE_TH1_DOCS)
121
+ VALUE "Th1Docs", "Yes\0"
122
+#else
123
+ VALUE "Th1Docs", "No\0"
124
+#endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
120125
#if defined(FOSSIL_ENABLE_TH1_HOOKS)
121126
VALUE "Th1Hooks", "Yes\0"
122127
#else
123128
VALUE "Th1Hooks", "No\0"
124129
#endif /* defined(FOSSIL_ENABLE_TH1_HOOKS) */
125130
--- win/fossil.rc
+++ win/fossil.rc
@@ -115,10 +115,15 @@
115 VALUE "CommandLineIsUnicode", "Yes\0"
116 #endif /* defined(BROKEN_MINGW_CMDLINE) */
117 #if defined(FOSSIL_ENABLE_SSL)
118 VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
119 #endif /* defined(FOSSIL_ENABLE_SSL) */
 
 
 
 
 
120 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
121 VALUE "Th1Hooks", "Yes\0"
122 #else
123 VALUE "Th1Hooks", "No\0"
124 #endif /* defined(FOSSIL_ENABLE_TH1_HOOKS) */
125
--- win/fossil.rc
+++ win/fossil.rc
@@ -115,10 +115,15 @@
115 VALUE "CommandLineIsUnicode", "Yes\0"
116 #endif /* defined(BROKEN_MINGW_CMDLINE) */
117 #if defined(FOSSIL_ENABLE_SSL)
118 VALUE "SslEnabled", "Yes, " OPENSSL_VERSION_TEXT "\0"
119 #endif /* defined(FOSSIL_ENABLE_SSL) */
120 #if defined(FOSSIL_ENABLE_TH1_DOCS)
121 VALUE "Th1Docs", "Yes\0"
122 #else
123 VALUE "Th1Docs", "No\0"
124 #endif /* defined(FOSSIL_ENABLE_TH1_DOCS) */
125 #if defined(FOSSIL_ENABLE_TH1_HOOKS)
126 VALUE "Th1Hooks", "Yes\0"
127 #else
128 VALUE "Th1Hooks", "No\0"
129 #endif /* defined(FOSSIL_ENABLE_TH1_HOOKS) */
130

Keyboard Shortcuts

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