Fossil SCM
Fix built-in TH1 command registration broken by the previous commit.
Commit
5d20065c4b9963c6dcb60e94944750173cb98b9d
Parent
0e6862046d0f85e…
1 file changed
+7
-3
+7
-3
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -868,14 +868,18 @@ | ||
| 868 | 868 | */ |
| 869 | 869 | db_find_and_open_repository(OPEN_ANY_SCHEMA | OPEN_OK_NOT_FOUND, 0); |
| 870 | 870 | db_open_config(0); |
| 871 | 871 | } |
| 872 | 872 | if( forceReset || forceTcl || g.interp==0 ){ |
| 873 | + int created = 0; | |
| 873 | 874 | 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. */ | |
| 877 | 881 | } |
| 878 | 882 | #ifdef FOSSIL_ENABLE_TCL |
| 879 | 883 | if( forceTcl || getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){ |
| 880 | 884 | if( !g.tcl.setup ){ |
| 881 | 885 | g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */ |
| 882 | 886 |
| --- 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 |