Fossil SCM

Revise TH1 initialization function to accept a single flags argument. Cleanup and revise version information reported for zlib and Tcl.

mistachkin 2013-09-15 18:51 trunk
Commit 0e6862046d0f85eecae8b5c69c23156de0a3efb7
4 files changed +12 -12 +29 -10 +2 -2 +1 -1
+12 -12
--- src/main.c
+++ src/main.c
@@ -778,10 +778,13 @@
778778
}
779779
}
780780
assert(nCmd && "page list is empty?");
781781
multi_column_list(aCmd, nCmd);
782782
}
783
+
784
+
785
+
783786
784787
/*
785788
** COMMAND: version
786789
**
787790
** Usage: %fossil version ?-verbose|-v?
@@ -803,27 +806,24 @@
803806
#endif
804807
fossil_print("Compiled on %s %s using %s (%d-bit)\n",
805808
__DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
806809
fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
807810
fossil_print("Schema version %s\n", AUX_SCHEMA);
808
- fossil_print("zlib %s\n", zlibVersion());
811
+ fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
809812
#if defined(FOSSIL_ENABLE_SSL)
810813
fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
811814
#endif
812815
#if defined(FOSSIL_ENABLE_TCL)
813
- Th_FossilInit(0, 0);
814
- th_register_tcl(g.interp, &g.tcl);
815
- rc = Th_Eval(g.interp, 0, "tclEval {package require Tcl}", -1);
816
- zRc = Th_ReturnCodeName(rc, 1);
817
- fossil_print("TCL (Tcl %s%s%s%s)\n", zRc, zRc ? ": " : "",
818
- Th_GetResult(g.interp, 0),
816
+ Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
817
+ rc = Th_Eval(g.interp, 0, "tclEval {info patchlevel}", -1);
818
+ zRc = Th_ReturnCodeName(rc, 0);
819
+ fossil_print("TCL (Tcl %s, loaded %s: %s)\n",
820
+ TCL_PATCH_LEVEL, zRc, Th_GetResult(g.interp, 0)
821
+ );
822
+#endif
819823
#if defined(FOSSIL_ENABLE_TCL_STUBS)
820
- zRc? "" : ", loaded only when needed"
821
-#else
822
- ""
823
-#endif
824
- );
824
+ fossil_print("TCL_STUBS\n");
825825
#endif
826826
#if defined(FOSSIL_ENABLE_JSON)
827827
fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
828828
#endif
829829
}
830830
--- src/main.c
+++ src/main.c
@@ -778,10 +778,13 @@
778 }
779 }
780 assert(nCmd && "page list is empty?");
781 multi_column_list(aCmd, nCmd);
782 }
 
 
 
783
784 /*
785 ** COMMAND: version
786 **
787 ** Usage: %fossil version ?-verbose|-v?
@@ -803,27 +806,24 @@
803 #endif
804 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
805 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
806 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
807 fossil_print("Schema version %s\n", AUX_SCHEMA);
808 fossil_print("zlib %s\n", zlibVersion());
809 #if defined(FOSSIL_ENABLE_SSL)
810 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
811 #endif
812 #if defined(FOSSIL_ENABLE_TCL)
813 Th_FossilInit(0, 0);
814 th_register_tcl(g.interp, &g.tcl);
815 rc = Th_Eval(g.interp, 0, "tclEval {package require Tcl}", -1);
816 zRc = Th_ReturnCodeName(rc, 1);
817 fossil_print("TCL (Tcl %s%s%s%s)\n", zRc, zRc ? ": " : "",
818 Th_GetResult(g.interp, 0),
 
819 #if defined(FOSSIL_ENABLE_TCL_STUBS)
820 zRc? "" : ", loaded only when needed"
821 #else
822 ""
823 #endif
824 );
825 #endif
826 #if defined(FOSSIL_ENABLE_JSON)
827 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
828 #endif
829 }
830
--- src/main.c
+++ src/main.c
@@ -778,10 +778,13 @@
778 }
779 }
780 assert(nCmd && "page list is empty?");
781 multi_column_list(aCmd, nCmd);
782 }
783
784
785
786
787 /*
788 ** COMMAND: version
789 **
790 ** Usage: %fossil version ?-verbose|-v?
@@ -803,27 +806,24 @@
806 #endif
807 fossil_print("Compiled on %s %s using %s (%d-bit)\n",
808 __DATE__, __TIME__, COMPILER_NAME, sizeof(void*)*8);
809 fossil_print("SQLite %s %.30s\n", SQLITE_VERSION, SQLITE_SOURCE_ID);
810 fossil_print("Schema version %s\n", AUX_SCHEMA);
811 fossil_print("zlib %s, loaded %s\n", ZLIB_VERSION, zlibVersion());
812 #if defined(FOSSIL_ENABLE_SSL)
813 fossil_print("SSL (%s)\n", OPENSSL_VERSION_TEXT);
814 #endif
815 #if defined(FOSSIL_ENABLE_TCL)
816 Th_FossilInit(TH_INIT_DEFAULT | TH_INIT_FORCE_TCL);
817 rc = Th_Eval(g.interp, 0, "tclEval {info patchlevel}", -1);
818 zRc = Th_ReturnCodeName(rc, 0);
819 fossil_print("TCL (Tcl %s, loaded %s: %s)\n",
820 TCL_PATCH_LEVEL, zRc, Th_GetResult(g.interp, 0)
821 );
822 #endif
823 #if defined(FOSSIL_ENABLE_TCL_STUBS)
824 fossil_print("TCL_STUBS\n");
 
 
 
 
825 #endif
826 #if defined(FOSSIL_ENABLE_JSON)
827 fossil_print("JSON (API %s)\n", FOSSIL_JSON_API_VERSION);
828 #endif
829 }
830
+29 -10
--- src/th_main.c
+++ src/th_main.c
@@ -20,10 +20,23 @@
2020
*/
2121
#include "config.h"
2222
#include "th_main.h"
2323
#include "sqlite3.h"
2424
25
+#if INTERFACE
26
+/*
27
+** Flag parameters to the Th_FossilInit() routine used to control the
28
+** interpreter creation and initialization process.
29
+*/
30
+#define TH_INIT_NONE ((u32)0x00000000) /* No flags. */
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
+#endif
37
+
2538
/*
2639
** Global variable counting the number of outstanding calls to malloc()
2740
** made by the th1 implementation. This is used to catch memory leaks
2841
** in the interpreter. Obviously, it also means th1 is not threadsafe.
2942
*/
@@ -810,12 +823,16 @@
810823
** Make sure the interpreter has been initialized. Initialize it if
811824
** it has not been already.
812825
**
813826
** The interpreter is stored in the g.interp global variable.
814827
*/
815
-void Th_FossilInit(int needConfig, int forceSetup){
828
+void Th_FossilInit(u32 flags){
816829
int wasInit = 0;
830
+ int needConfig = flags & TH_INIT_NEED_CONFIG;
831
+ int forceReset = flags & TH_INIT_FORCE_RESET;
832
+ int forceTcl = flags & TH_INIT_FORCE_TCL;
833
+ int forceSetup = flags & TH_INIT_FORCE_SETUP;
817834
static unsigned int aFlags[] = { 0, 1, WIKI_LINKSONLY };
818835
static struct _Command {
819836
const char *zName;
820837
Th_CommandProc xProc;
821838
void *pContext;
@@ -850,16 +867,18 @@
850867
** the necessary database connections are open prior to continuing.
851868
*/
852869
db_find_and_open_repository(OPEN_ANY_SCHEMA | OPEN_OK_NOT_FOUND, 0);
853870
db_open_config(0);
854871
}
855
- if( g.interp==0 ){
872
+ if( forceReset || forceTcl || g.interp==0 ){
856873
int i;
857
- g.interp = Th_CreateInterp(&vtab);
858
- th_register_language(g.interp); /* Basic scripting commands. */
874
+ if( g.interp==0 ) g.interp = Th_CreateInterp(&vtab);
875
+ if( forceReset || g.interp==0 ){
876
+ th_register_language(g.interp); /* Basic scripting commands. */
877
+ }
859878
#ifdef FOSSIL_ENABLE_TCL
860
- if( getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
879
+ if( forceTcl || getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
861880
if( !g.tcl.setup ){
862881
g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
863882
}
864883
th_register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
865884
}
@@ -894,11 +913,11 @@
894913
895914
/*
896915
** Store a string value in a variable in the interpreter.
897916
*/
898917
void Th_Store(const char *zName, const char *zValue){
899
- Th_FossilInit(0, 0);
918
+ Th_FossilInit(TH_INIT_DEFAULT);
900919
if( zValue ){
901920
if( g.thTrace ){
902921
Th_Trace("set %h {%h}<br />\n", zName, zValue);
903922
}
904923
Th_SetVar(g.interp, zName, -1, zValue, strlen(zValue));
@@ -909,11 +928,11 @@
909928
** Store an integer value in a variable in the interpreter.
910929
*/
911930
void Th_StoreInt(const char *zName, int iValue){
912931
Blob value;
913932
char *zValue;
914
- Th_FossilInit(0, 0);
933
+ Th_FossilInit(TH_INIT_DEFAULT);
915934
blob_zero(&value);
916935
blob_appendf(&value, "%d", iValue);
917936
zValue = blob_str(&value);
918937
if( g.thTrace ){
919938
Th_Trace("set %h {%h}<br />\n", zName, zValue);
@@ -935,11 +954,11 @@
935954
** Retrieve a string value from the interpreter. If no such
936955
** variable exists, return NULL.
937956
*/
938957
char *Th_Fetch(const char *zName, int *pSize){
939958
int rc;
940
- Th_FossilInit(0, 0);
959
+ Th_FossilInit(TH_INIT_DEFAULT);
941960
rc = Th_GetVar(g.interp, (char*)zName, -1);
942961
if( rc==TH_OK ){
943962
return (char*)Th_GetResult(g.interp, pSize);
944963
}else{
945964
return 0;
@@ -1015,11 +1034,11 @@
10151034
int Th_Render(const char *z){
10161035
int i = 0;
10171036
int n;
10181037
int rc = TH_OK;
10191038
char *zResult;
1020
- Th_FossilInit(0, 0);
1039
+ Th_FossilInit(TH_INIT_DEFAULT);
10211040
while( z[i] ){
10221041
if( z[i]=='$' && (n = validVarName(&z[i+1]))>0 ){
10231042
const char *zVar;
10241043
int nVar;
10251044
int encode = 1;
@@ -1095,11 +1114,11 @@
10951114
db_open_config(0);
10961115
}
10971116
if( g.argc!=3 ){
10981117
usage("script");
10991118
}
1100
- Th_FossilInit(0, 0);
1119
+ Th_FossilInit(TH_INIT_DEFAULT);
11011120
rc = Th_Eval(g.interp, 0, g.argv[2], -1);
11021121
zRc = Th_ReturnCodeName(rc, 1);
11031122
fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
11041123
Th_PrintTraceLog();
11051124
}
11061125
--- src/th_main.c
+++ src/th_main.c
@@ -20,10 +20,23 @@
20 */
21 #include "config.h"
22 #include "th_main.h"
23 #include "sqlite3.h"
24
 
 
 
 
 
 
 
 
 
 
 
 
 
25 /*
26 ** Global variable counting the number of outstanding calls to malloc()
27 ** made by the th1 implementation. This is used to catch memory leaks
28 ** in the interpreter. Obviously, it also means th1 is not threadsafe.
29 */
@@ -810,12 +823,16 @@
810 ** Make sure the interpreter has been initialized. Initialize it if
811 ** it has not been already.
812 **
813 ** The interpreter is stored in the g.interp global variable.
814 */
815 void Th_FossilInit(int needConfig, int forceSetup){
816 int wasInit = 0;
 
 
 
 
817 static unsigned int aFlags[] = { 0, 1, WIKI_LINKSONLY };
818 static struct _Command {
819 const char *zName;
820 Th_CommandProc xProc;
821 void *pContext;
@@ -850,16 +867,18 @@
850 ** the necessary database connections are open prior to continuing.
851 */
852 db_find_and_open_repository(OPEN_ANY_SCHEMA | OPEN_OK_NOT_FOUND, 0);
853 db_open_config(0);
854 }
855 if( g.interp==0 ){
856 int i;
857 g.interp = Th_CreateInterp(&vtab);
858 th_register_language(g.interp); /* Basic scripting commands. */
 
 
859 #ifdef FOSSIL_ENABLE_TCL
860 if( getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
861 if( !g.tcl.setup ){
862 g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
863 }
864 th_register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
865 }
@@ -894,11 +913,11 @@
894
895 /*
896 ** Store a string value in a variable in the interpreter.
897 */
898 void Th_Store(const char *zName, const char *zValue){
899 Th_FossilInit(0, 0);
900 if( zValue ){
901 if( g.thTrace ){
902 Th_Trace("set %h {%h}<br />\n", zName, zValue);
903 }
904 Th_SetVar(g.interp, zName, -1, zValue, strlen(zValue));
@@ -909,11 +928,11 @@
909 ** Store an integer value in a variable in the interpreter.
910 */
911 void Th_StoreInt(const char *zName, int iValue){
912 Blob value;
913 char *zValue;
914 Th_FossilInit(0, 0);
915 blob_zero(&value);
916 blob_appendf(&value, "%d", iValue);
917 zValue = blob_str(&value);
918 if( g.thTrace ){
919 Th_Trace("set %h {%h}<br />\n", zName, zValue);
@@ -935,11 +954,11 @@
935 ** Retrieve a string value from the interpreter. If no such
936 ** variable exists, return NULL.
937 */
938 char *Th_Fetch(const char *zName, int *pSize){
939 int rc;
940 Th_FossilInit(0, 0);
941 rc = Th_GetVar(g.interp, (char*)zName, -1);
942 if( rc==TH_OK ){
943 return (char*)Th_GetResult(g.interp, pSize);
944 }else{
945 return 0;
@@ -1015,11 +1034,11 @@
1015 int Th_Render(const char *z){
1016 int i = 0;
1017 int n;
1018 int rc = TH_OK;
1019 char *zResult;
1020 Th_FossilInit(0, 0);
1021 while( z[i] ){
1022 if( z[i]=='$' && (n = validVarName(&z[i+1]))>0 ){
1023 const char *zVar;
1024 int nVar;
1025 int encode = 1;
@@ -1095,11 +1114,11 @@
1095 db_open_config(0);
1096 }
1097 if( g.argc!=3 ){
1098 usage("script");
1099 }
1100 Th_FossilInit(0, 0);
1101 rc = Th_Eval(g.interp, 0, g.argv[2], -1);
1102 zRc = Th_ReturnCodeName(rc, 1);
1103 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
1104 Th_PrintTraceLog();
1105 }
1106
--- src/th_main.c
+++ src/th_main.c
@@ -20,10 +20,23 @@
20 */
21 #include "config.h"
22 #include "th_main.h"
23 #include "sqlite3.h"
24
25 #if INTERFACE
26 /*
27 ** Flag parameters to the Th_FossilInit() routine used to control the
28 ** interpreter creation and initialization process.
29 */
30 #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */
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 #endif
37
38 /*
39 ** Global variable counting the number of outstanding calls to malloc()
40 ** made by the th1 implementation. This is used to catch memory leaks
41 ** in the interpreter. Obviously, it also means th1 is not threadsafe.
42 */
@@ -810,12 +823,16 @@
823 ** Make sure the interpreter has been initialized. Initialize it if
824 ** it has not been already.
825 **
826 ** The interpreter is stored in the g.interp global variable.
827 */
828 void Th_FossilInit(u32 flags){
829 int wasInit = 0;
830 int needConfig = flags & TH_INIT_NEED_CONFIG;
831 int forceReset = flags & TH_INIT_FORCE_RESET;
832 int forceTcl = flags & TH_INIT_FORCE_TCL;
833 int forceSetup = flags & TH_INIT_FORCE_SETUP;
834 static unsigned int aFlags[] = { 0, 1, WIKI_LINKSONLY };
835 static struct _Command {
836 const char *zName;
837 Th_CommandProc xProc;
838 void *pContext;
@@ -850,16 +867,18 @@
867 ** the necessary database connections are open prior to continuing.
868 */
869 db_find_and_open_repository(OPEN_ANY_SCHEMA | OPEN_OK_NOT_FOUND, 0);
870 db_open_config(0);
871 }
872 if( forceReset || forceTcl || g.interp==0 ){
873 int i;
874 if( g.interp==0 ) g.interp = Th_CreateInterp(&vtab);
875 if( forceReset || g.interp==0 ){
876 th_register_language(g.interp); /* Basic scripting commands. */
877 }
878 #ifdef FOSSIL_ENABLE_TCL
879 if( forceTcl || getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
880 if( !g.tcl.setup ){
881 g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
882 }
883 th_register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
884 }
@@ -894,11 +913,11 @@
913
914 /*
915 ** Store a string value in a variable in the interpreter.
916 */
917 void Th_Store(const char *zName, const char *zValue){
918 Th_FossilInit(TH_INIT_DEFAULT);
919 if( zValue ){
920 if( g.thTrace ){
921 Th_Trace("set %h {%h}<br />\n", zName, zValue);
922 }
923 Th_SetVar(g.interp, zName, -1, zValue, strlen(zValue));
@@ -909,11 +928,11 @@
928 ** Store an integer value in a variable in the interpreter.
929 */
930 void Th_StoreInt(const char *zName, int iValue){
931 Blob value;
932 char *zValue;
933 Th_FossilInit(TH_INIT_DEFAULT);
934 blob_zero(&value);
935 blob_appendf(&value, "%d", iValue);
936 zValue = blob_str(&value);
937 if( g.thTrace ){
938 Th_Trace("set %h {%h}<br />\n", zName, zValue);
@@ -935,11 +954,11 @@
954 ** Retrieve a string value from the interpreter. If no such
955 ** variable exists, return NULL.
956 */
957 char *Th_Fetch(const char *zName, int *pSize){
958 int rc;
959 Th_FossilInit(TH_INIT_DEFAULT);
960 rc = Th_GetVar(g.interp, (char*)zName, -1);
961 if( rc==TH_OK ){
962 return (char*)Th_GetResult(g.interp, pSize);
963 }else{
964 return 0;
@@ -1015,11 +1034,11 @@
1034 int Th_Render(const char *z){
1035 int i = 0;
1036 int n;
1037 int rc = TH_OK;
1038 char *zResult;
1039 Th_FossilInit(TH_INIT_DEFAULT);
1040 while( z[i] ){
1041 if( z[i]=='$' && (n = validVarName(&z[i+1]))>0 ){
1042 const char *zVar;
1043 int nVar;
1044 int encode = 1;
@@ -1095,11 +1114,11 @@
1114 db_open_config(0);
1115 }
1116 if( g.argc!=3 ){
1117 usage("script");
1118 }
1119 Th_FossilInit(TH_INIT_DEFAULT);
1120 rc = Th_Eval(g.interp, 0, g.argv[2], -1);
1121 zRc = Th_ReturnCodeName(rc, 1);
1122 fossil_print("%s%s%s\n", zRc, zRc ? ": " : "", Th_GetResult(g.interp, 0));
1123 Th_PrintTraceLog();
1124 }
1125
+2 -2
--- src/tkt.c
+++ src/tkt.c
@@ -313,21 +313,21 @@
313313
/*
314314
** Create the TH1 interpreter and load the "common" code.
315315
*/
316316
void ticket_init(void){
317317
const char *zConfig;
318
- Th_FossilInit(0, 0);
318
+ Th_FossilInit(TH_INIT_DEFAULT);
319319
zConfig = ticket_common_code();
320320
Th_Eval(g.interp, 0, zConfig, -1);
321321
}
322322
323323
/*
324324
** Create the TH1 interpreter and load the "change" code.
325325
*/
326326
int ticket_change(void){
327327
const char *zConfig;
328
- Th_FossilInit(0, 0);
328
+ Th_FossilInit(TH_INIT_DEFAULT);
329329
zConfig = ticket_change_code();
330330
return Th_Eval(g.interp, 0, zConfig, -1);
331331
}
332332
333333
/*
334334
--- src/tkt.c
+++ src/tkt.c
@@ -313,21 +313,21 @@
313 /*
314 ** Create the TH1 interpreter and load the "common" code.
315 */
316 void ticket_init(void){
317 const char *zConfig;
318 Th_FossilInit(0, 0);
319 zConfig = ticket_common_code();
320 Th_Eval(g.interp, 0, zConfig, -1);
321 }
322
323 /*
324 ** Create the TH1 interpreter and load the "change" code.
325 */
326 int ticket_change(void){
327 const char *zConfig;
328 Th_FossilInit(0, 0);
329 zConfig = ticket_change_code();
330 return Th_Eval(g.interp, 0, zConfig, -1);
331 }
332
333 /*
334
--- src/tkt.c
+++ src/tkt.c
@@ -313,21 +313,21 @@
313 /*
314 ** Create the TH1 interpreter and load the "common" code.
315 */
316 void ticket_init(void){
317 const char *zConfig;
318 Th_FossilInit(TH_INIT_DEFAULT);
319 zConfig = ticket_common_code();
320 Th_Eval(g.interp, 0, zConfig, -1);
321 }
322
323 /*
324 ** Create the TH1 interpreter and load the "change" code.
325 */
326 int ticket_change(void){
327 const char *zConfig;
328 Th_FossilInit(TH_INIT_DEFAULT);
329 zConfig = ticket_change_code();
330 return Th_Eval(g.interp, 0, zConfig, -1);
331 }
332
333 /*
334
+1 -1
--- src/xfer.c
+++ src/xfer.c
@@ -827,11 +827,11 @@
827827
*/
828828
static int run_script(const char *zScript){
829829
if( !zScript ){
830830
return TH_OK; /* No script, return success. */
831831
}
832
- Th_FossilInit(0, 0); /* Make sure TH1 is ready. */
832
+ Th_FossilInit(TH_INIT_DEFAULT); /* Make sure TH1 is ready. */
833833
return Th_Eval(g.interp, 0, zScript, -1);
834834
}
835835
836836
/*
837837
** Run the pre-transfer TH1 script, if any, and returns the return code.
838838
--- src/xfer.c
+++ src/xfer.c
@@ -827,11 +827,11 @@
827 */
828 static int run_script(const char *zScript){
829 if( !zScript ){
830 return TH_OK; /* No script, return success. */
831 }
832 Th_FossilInit(0, 0); /* Make sure TH1 is ready. */
833 return Th_Eval(g.interp, 0, zScript, -1);
834 }
835
836 /*
837 ** Run the pre-transfer TH1 script, if any, and returns the return code.
838
--- src/xfer.c
+++ src/xfer.c
@@ -827,11 +827,11 @@
827 */
828 static int run_script(const char *zScript){
829 if( !zScript ){
830 return TH_OK; /* No script, return success. */
831 }
832 Th_FossilInit(TH_INIT_DEFAULT); /* Make sure TH1 is ready. */
833 return Th_Eval(g.interp, 0, zScript, -1);
834 }
835
836 /*
837 ** Run the pre-transfer TH1 script, if any, and returns the return code.
838

Keyboard Shortcuts

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