Fossil SCM

Fix built-in TH1 command registration broken by the previous commit.

mistachkin 2013-09-16 06:04 trunk
Commit 5d20065c4b9963c6dcb60e94944750173cb98b9d
1 file changed +7 -3
+7 -3
--- src/th_main.c
+++ src/th_main.c
@@ -868,14 +868,18 @@
868868
*/
869869
db_find_and_open_repository(OPEN_ANY_SCHEMA | OPEN_OK_NOT_FOUND, 0);
870870
db_open_config(0);
871871
}
872872
if( forceReset || forceTcl || g.interp==0 ){
873
+ int created = 0;
873874
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. */
875
+ if( g.interp==0 ){
876
+ g.interp = Th_CreateInterp(&vtab);
877
+ created = 1;
878
+ }
879
+ if( forceReset || created ){
880
+ th_register_language(g.interp); /* Basic scripting commands. */
877881
}
878882
#ifdef FOSSIL_ENABLE_TCL
879883
if( forceTcl || getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
880884
if( !g.tcl.setup ){
881885
g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
882886
--- src/th_main.c
+++ src/th_main.c
@@ -868,14 +868,18 @@
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
--- src/th_main.c
+++ src/th_main.c
@@ -868,14 +868,18 @@
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 created = 0;
874 int i;
875 if( g.interp==0 ){
876 g.interp = Th_CreateInterp(&vtab);
877 created = 1;
878 }
879 if( forceReset || created ){
880 th_register_language(g.interp); /* Basic scripting commands. */
881 }
882 #ifdef FOSSIL_ENABLE_TCL
883 if( forceTcl || getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
884 if( !g.tcl.setup ){
885 g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
886

Keyboard Shortcuts

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