Fossil SCM

Cleanup style and use Jim_Obj APIs when bridging commands from Tcl to Jim.

mistachkin 2011-11-04 23:34 jimtcl
Commit d87454917c587741e7e3eba070ba65e7819bf316
+3 -3
--- src/main.c
+++ src/main.c
@@ -129,11 +129,11 @@
129129
int sslNotAvailable; /* SSL is not available. Do not redirect to https: */
130130
Blob cgiIn; /* Input to an xfer www method */
131131
int cgiOutput; /* Write error and status messages to CGI */
132132
int xferPanic; /* Write error messages in XFER protocol */
133133
int fullHttpReply; /* True for full HTTP reply. False for CGI reply */
134
- Jim_Interp *interp; /* The TH1 interpreter */
134
+ Jim_Interp *interp; /* The script interpreter */
135135
FILE *httpIn; /* Accept HTTP input from here */
136136
FILE *httpOut; /* Send HTTP output here */
137137
int xlinkClusterOnly; /* Set when cloning. Only process clusters */
138138
int fTimeFormat; /* 1 for UTC. 2 for localtime. 0 not yet selected */
139139
int *aCommitFile; /* Array of files to be committed */
@@ -180,12 +180,12 @@
180180
char zCsrfToken[12]; /* Value of the anti-CSRF token */
181181
int okCsrf; /* Anti-CSRF token is present and valid */
182182
183183
int parseCnt[10]; /* Counts of artifacts parsed */
184184
FILE *fDebug; /* Write debug information here, if the file exists */
185
- int thTrace; /* True to enable TH1 debugging output */
186
- Blob thLog; /* Text of the TH1 debugging output */
185
+ int thTrace; /* True to enable script debugging output */
186
+ Blob thLog; /* Text of the script debugging output */
187187
188188
int isHome; /* True if rendering the "home" page */
189189
190190
/* Storage for the aux() and/or option() SQL function arguments */
191191
int nAux; /* Number of distinct aux() or option() values */
192192
--- src/main.c
+++ src/main.c
@@ -129,11 +129,11 @@
129 int sslNotAvailable; /* SSL is not available. Do not redirect to https: */
130 Blob cgiIn; /* Input to an xfer www method */
131 int cgiOutput; /* Write error and status messages to CGI */
132 int xferPanic; /* Write error messages in XFER protocol */
133 int fullHttpReply; /* True for full HTTP reply. False for CGI reply */
134 Jim_Interp *interp; /* The TH1 interpreter */
135 FILE *httpIn; /* Accept HTTP input from here */
136 FILE *httpOut; /* Send HTTP output here */
137 int xlinkClusterOnly; /* Set when cloning. Only process clusters */
138 int fTimeFormat; /* 1 for UTC. 2 for localtime. 0 not yet selected */
139 int *aCommitFile; /* Array of files to be committed */
@@ -180,12 +180,12 @@
180 char zCsrfToken[12]; /* Value of the anti-CSRF token */
181 int okCsrf; /* Anti-CSRF token is present and valid */
182
183 int parseCnt[10]; /* Counts of artifacts parsed */
184 FILE *fDebug; /* Write debug information here, if the file exists */
185 int thTrace; /* True to enable TH1 debugging output */
186 Blob thLog; /* Text of the TH1 debugging output */
187
188 int isHome; /* True if rendering the "home" page */
189
190 /* Storage for the aux() and/or option() SQL function arguments */
191 int nAux; /* Number of distinct aux() or option() values */
192
--- src/main.c
+++ src/main.c
@@ -129,11 +129,11 @@
129 int sslNotAvailable; /* SSL is not available. Do not redirect to https: */
130 Blob cgiIn; /* Input to an xfer www method */
131 int cgiOutput; /* Write error and status messages to CGI */
132 int xferPanic; /* Write error messages in XFER protocol */
133 int fullHttpReply; /* True for full HTTP reply. False for CGI reply */
134 Jim_Interp *interp; /* The script interpreter */
135 FILE *httpIn; /* Accept HTTP input from here */
136 FILE *httpOut; /* Send HTTP output here */
137 int xlinkClusterOnly; /* Set when cloning. Only process clusters */
138 int fTimeFormat; /* 1 for UTC. 2 for localtime. 0 not yet selected */
139 int *aCommitFile; /* Array of files to be committed */
@@ -180,12 +180,12 @@
180 char zCsrfToken[12]; /* Value of the anti-CSRF token */
181 int okCsrf; /* Anti-CSRF token is present and valid */
182
183 int parseCnt[10]; /* Counts of artifacts parsed */
184 FILE *fDebug; /* Write debug information here, if the file exists */
185 int thTrace; /* True to enable script debugging output */
186 Blob thLog; /* Text of the script debugging output */
187
188 int isHome; /* True if rendering the "home" page */
189
190 /* Storage for the aux() and/or option() SQL function arguments */
191 int nAux; /* Number of distinct aux() or option() values */
192
+6 -5
--- src/th_main.c
+++ src/th_main.c
@@ -355,16 +355,17 @@
355355
356356
/* Register static extensions */
357357
Jim_InitStaticExtensions(g.interp);
358358
359359
#ifdef FOSSIL_ENABLE_TCL
360
- if( getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
361
- th_register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
360
+ if( getenv("FOSSIL_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
361
+ register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
362362
}
363363
#endif
364364
for(i=0; i<sizeof(aCommand)/sizeof(aCommand[0]); i++){
365
- Jim_CreateCommand(g.interp, aCommand[i].zName, aCommand[i].xProc, NULL, NULL);
365
+ Jim_CreateCommand(g.interp, aCommand[i].zName, aCommand[i].xProc, NULL,
366
+ NULL);
366367
}
367368
}
368369
}
369370
370371
/*
@@ -539,17 +540,17 @@
539540
}
540541
return rc;
541542
}
542543
543544
/*
544
-** COMMAND: test-th-render
545
+** COMMAND: test-script-render
545546
*/
546
-void test_th_render(void){
547
+void test_script_render(void){
547548
Blob in;
548549
if( g.argc<3 ){
549550
usage("FILE");
550551
}
551552
db_open_config(0); /* Needed for "tcl" setting. */
552553
blob_zero(&in);
553554
blob_read_from_file(&in, g.argv[2]);
554555
Th_Render(blob_str(&in));
555556
}
556557
--- src/th_main.c
+++ src/th_main.c
@@ -355,16 +355,17 @@
355
356 /* Register static extensions */
357 Jim_InitStaticExtensions(g.interp);
358
359 #ifdef FOSSIL_ENABLE_TCL
360 if( getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
361 th_register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
362 }
363 #endif
364 for(i=0; i<sizeof(aCommand)/sizeof(aCommand[0]); i++){
365 Jim_CreateCommand(g.interp, aCommand[i].zName, aCommand[i].xProc, NULL, NULL);
 
366 }
367 }
368 }
369
370 /*
@@ -539,17 +540,17 @@
539 }
540 return rc;
541 }
542
543 /*
544 ** COMMAND: test-th-render
545 */
546 void test_th_render(void){
547 Blob in;
548 if( g.argc<3 ){
549 usage("FILE");
550 }
551 db_open_config(0); /* Needed for "tcl" setting. */
552 blob_zero(&in);
553 blob_read_from_file(&in, g.argv[2]);
554 Th_Render(blob_str(&in));
555 }
556
--- src/th_main.c
+++ src/th_main.c
@@ -355,16 +355,17 @@
355
356 /* Register static extensions */
357 Jim_InitStaticExtensions(g.interp);
358
359 #ifdef FOSSIL_ENABLE_TCL
360 if( getenv("FOSSIL_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
361 register_tcl(g.interp, &g.tcl); /* Tcl integration commands. */
362 }
363 #endif
364 for(i=0; i<sizeof(aCommand)/sizeof(aCommand[0]); i++){
365 Jim_CreateCommand(g.interp, aCommand[i].zName, aCommand[i].xProc, NULL,
366 NULL);
367 }
368 }
369 }
370
371 /*
@@ -539,17 +540,17 @@
540 }
541 return rc;
542 }
543
544 /*
545 ** COMMAND: test-script-render
546 */
547 void test_script_render(void){
548 Blob in;
549 if( g.argc<3 ){
550 usage("FILE");
551 }
552 db_open_config(0); /* Needed for "tcl" setting. */
553 blob_zero(&in);
554 blob_read_from_file(&in, g.argv[2]);
555 Th_Render(blob_str(&in));
556 }
557
+76 -53
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -6,11 +6,11 @@
66
** This program is distributed in the hope that it will be useful,
77
** but without any warranty; without even the implied warranty of
88
** merchantability or fitness for a particular purpose.
99
**
1010
*******************************************************************************
11
-** This file contains code used to bridge the TH1 and Tcl scripting languages.
11
+** This file contains code used to bridge the Jim and Tcl scripting languages.
1212
*/
1313
1414
#include "config.h"
1515
1616
#ifdef FOSSIL_ENABLE_TCL
@@ -30,23 +30,23 @@
3030
#define USE_TCL_EVALOBJV 1
3131
#endif
3232
3333
/*
3434
** These macros are designed to reduce the redundant code required to marshal
35
-** arguments from TH1 to Tcl.
35
+** arguments from Jim to Tcl.
3636
*/
3737
#define USE_ARGV_TO_OBJV() \
3838
int objc; \
3939
Tcl_Obj **objv; \
4040
int i;
4141
42
-#define COPY_ARGV_TO_OBJV() \
43
- objc = argc-1; \
44
- objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \
45
- for(i=1; i<argc; i++){ \
46
- objv[i-1] = Tcl_NewStringObj(Jim_String(argv[i]), Jim_Length(argv[i])); \
47
- Tcl_IncrRefCount(objv[i-1]); \
42
+#define COPY_ARGV_TO_OBJV() \
43
+ objc = argc-1; \
44
+ objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \
45
+ for(i=1; i<argc; i++){ \
46
+ objv[i-1] = Tcl_NewStringObj(Jim_String(argv[i]), Jim_Length(argv[i])); \
47
+ Tcl_IncrRefCount(objv[i-1]); \
4848
}
4949
5050
#define FREE_ARGV_TO_OBJV() \
5151
for(i=1; i<argc; i++){ \
5252
Tcl_DecrRefCount(objv[i-1]); \
@@ -59,11 +59,11 @@
5959
*/
6060
#define GET_CTX_TCL_INTERP(ctx) \
6161
((struct TclContext *)(ctx))->interp
6262
6363
/*
64
-** Creates and initializes a Tcl interpreter for use with the specified TH1
64
+** Creates and initializes a Tcl interpreter for use with the specified Jim
6565
** interpreter. Stores the created Tcl interpreter in the Tcl context supplied
6666
** by the caller. This must be declared here because quite a few functions in
6767
** this file need to use it before it can be defined.
6868
*/
6969
static int createTclInterp(Jim_Interp *interp, void *pContext);
@@ -89,11 +89,11 @@
8989
}
9090
return Tcl_GetStringFromObj(resultPtr, pN);
9191
}
9292
9393
/*
94
-** Tcl context information used by TH1. This structure definition has been
94
+** Tcl context information used by Jim. This structure definition has been
9595
** copied from and should be kept in sync with the one in "main.c".
9696
*/
9797
struct TclContext {
9898
int argc;
9999
char **argv;
@@ -103,11 +103,14 @@
103103
/*
104104
** Syntax:
105105
**
106106
** tclEval arg ?arg ...?
107107
*/
108
-static int tclEval_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv
108
+static int tclEval_command(
109
+ Jim_Interp *interp,
110
+ int argc,
111
+ Jim_Obj *const *argv
109112
){
110113
Tcl_Interp *tclInterp;
111114
Tcl_Obj *objPtr;
112115
int rc;
113116
int nResult;
@@ -150,11 +153,14 @@
150153
/*
151154
** Syntax:
152155
**
153156
** tclExpr arg ?arg ...?
154157
*/
155
-static int tclExpr_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv
158
+static int tclExpr_command(
159
+ Jim_Interp *interp,
160
+ int argc,
161
+ Jim_Obj *const *argv
156162
){
157163
Tcl_Interp *tclInterp;
158164
Tcl_Obj *objPtr;
159165
Tcl_Obj *resultObjPtr;
160166
int rc;
@@ -203,11 +209,14 @@
203209
/*
204210
** Syntax:
205211
**
206212
** tclInvoke command ?arg ...?
207213
*/
208
-static int tclInvoke_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv
214
+static int tclInvoke_command(
215
+ Jim_Interp *interp,
216
+ int argc,
217
+ Jim_Obj *const *argv
209218
){
210219
Tcl_Interp *tclInterp;
211220
#ifndef USE_TCL_EVALOBJV
212221
Tcl_Command command;
213222
Tcl_CmdInfo cmdInfo;
@@ -243,11 +252,12 @@
243252
Tcl_DecrRefCount(objPtr);
244253
Tcl_Release((ClientData)tclInterp);
245254
return JIM_ERR;
246255
}
247256
if( !cmdInfo.objProc ){
248
- Jim_SetResultFormatted(interp, "Cannot invoke command not found: %#s", argv[1]);
257
+ Jim_SetResultFormatted(interp, "Cannot invoke command not found: %#s",
258
+ argv[1]);
249259
Tcl_DecrRefCount(objPtr);
250260
Tcl_Release((ClientData)tclInterp);
251261
return JIM_ERR;
252262
}
253263
Tcl_DecrRefCount(objPtr);
@@ -267,108 +277,118 @@
267277
}
268278
269279
/*
270280
** Syntax:
271281
**
272
-** th1Eval arg
282
+** bridgeEval arg
273283
*/
274
-static int Th1EvalObjCmd(
284
+static int BridgeEvalObjCmd(
275285
ClientData clientData,
276286
Tcl_Interp *interp,
277287
int objc,
278288
Tcl_Obj *CONST objv[]
279289
){
280
- Jim_Interp *th1Interp;
290
+ Jim_Interp *jimInterp;
281291
int nArg;
282292
const char *arg;
283293
int rc;
294
+ Jim_Obj *argObj;
295
+ Jim_Obj *resultObj;
284296
285297
if( objc!=2 ){
286298
Tcl_WrongNumArgs(interp, 1, objv, "arg");
287299
return TCL_ERROR;
288300
}
289
- th1Interp = (Jim_Interp *)clientData;
290
- if( !th1Interp ){
291
- Tcl_AppendResult(interp, "invalid TH1 interpreter", NULL);
301
+ jimInterp = (Jim_Interp *)clientData;
302
+ if( !jimInterp ){
303
+ Tcl_AppendResult(interp, "invalid bridge interpreter", NULL);
292304
return TCL_ERROR;
293305
}
294306
arg = Tcl_GetStringFromObj(objv[1], &nArg);
295
- rc = Jim_Eval(th1Interp, arg);
296
- arg = Jim_String(Jim_GetResult(th1Interp));
297
- Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, -1));
307
+ argObj = Jim_NewStringObj(jimInterp, arg, nArg);
308
+ Jim_IncrRefCount(argObj);
309
+ rc = Jim_EvalObj(jimInterp, argObj);
310
+ Jim_DecrRefCount(jimInterp, argObj);
311
+ resultObj = Jim_GetResult(jimInterp);
312
+ arg = Jim_GetString(resultObj, &nArg);
313
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg));
298314
return rc;
299315
}
300316
301317
/*
302318
** Syntax:
303319
**
304
-** th1Expr arg
320
+** bridgeExpr arg
305321
*/
306
-static int Th1ExprObjCmd(
322
+static int BridgeExprObjCmd(
307323
ClientData clientData,
308324
Tcl_Interp *interp,
309325
int objc,
310326
Tcl_Obj *CONST objv[]
311327
){
312
- Jim_Interp *th1Interp;
328
+ Jim_Interp *jimInterp;
313329
int nArg;
314330
const char *arg;
315331
int rc;
316
- Jim_Obj *exprResultObj;
332
+ Jim_Obj *argObj;
333
+ Jim_Obj *resultObj;
317334
318335
if( objc!=2 ){
319336
Tcl_WrongNumArgs(interp, 1, objv, "arg");
320337
return TCL_ERROR;
321338
}
322
- th1Interp = (Jim_Interp *)clientData;
323
- if( !th1Interp ){
324
- Tcl_AppendResult(interp, "invalid TH1 interpreter", NULL);
339
+ jimInterp = (Jim_Interp *)clientData;
340
+ if( !jimInterp ){
341
+ Tcl_AppendResult(interp, "invalid bridge interpreter", NULL);
325342
return TCL_ERROR;
326343
}
327
-
328344
arg = Tcl_GetStringFromObj(objv[1], &nArg);
329
- rc = Jim_EvalExpression(th1Interp, Jim_NewStringObj(th1Interp, arg, -1), &exprResultObj);
345
+ argObj = Jim_NewStringObj(jimInterp, arg, nArg);
346
+ Jim_IncrRefCount(argObj);
347
+ rc = Jim_EvalExpression(jimInterp, argObj, &resultObj);
348
+ Jim_DecrRefCount(jimInterp, argObj);
330349
if (rc == JIM_OK) {
331
- arg = Jim_String(exprResultObj);
332
- Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, -1));
350
+ arg = Jim_GetString(resultObj, &nArg);
351
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg));
333352
}
334
-
335353
return rc;
336354
}
337355
338356
/*
339357
** Array of Tcl integration commands. Used when adding or removing the Tcl
340
-** integration commands from TH1.
358
+** integration commands from Jim.
341359
*/
342360
static struct _Command {
343361
const char *zName;
344362
Jim_CmdProc xProc;
363
+ void *pContext;
345364
} aCommand[] = {
346
- {"tclEval", tclEval_command },
347
- {"tclExpr", tclExpr_command },
348
- {"tclInvoke", tclInvoke_command},
365
+ {"tclEval", tclEval_command, 0},
366
+ {"tclExpr", tclExpr_command, 0},
367
+ {"tclInvoke", tclInvoke_command, 0},
368
+ {0, 0, 0}
349369
};
350370
351371
/*
352372
** Called if the Tcl interpreter is deleted. Removes the Tcl integration
353
-** commands from the TH1 interpreter.
373
+** commands from the Jim interpreter.
354374
*/
355
-static void Th1DeleteProc(
375
+static void BridgeDeleteProc(
356376
ClientData clientData,
357377
Tcl_Interp *interp
358378
){
359379
int i;
360
- Jim_Interp *th1Interp = (Jim_Interp *)clientData;
361
- if( !th1Interp ) return;
380
+ Jim_Interp *jimInterp = (Jim_Interp *)clientData;
381
+ if( !jimInterp ) return;
362382
/* Remove the Tcl integration commands. */
363383
for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
364
- Jim_DeleteCommand(th1Interp, aCommand[i].zName);
384
+ Jim_DeleteCommand(jimInterp, aCommand[i].zName);
365385
}
366386
}
367387
368388
/*
369
-** Creates and initializes a Tcl interpreter for use with the specified TH1
389
+** Creates and initializes a Tcl interpreter for use with the specified Jim
370390
** interpreter. Stores the created Tcl interpreter in the Tcl context supplied
371391
** by the caller.
372392
*/
373393
static int createTclInterp(
374394
Jim_Interp *interp,
@@ -391,35 +411,38 @@
391411
if( !tclInterp || Tcl_InterpDeleted(tclInterp) ){
392412
Jim_SetResultString(interp, "Could not create Tcl interpreter", -1);
393413
return JIM_ERR;
394414
}
395415
if( Tcl_Init(tclInterp)!=TCL_OK ){
396
- Jim_SetResultFormatted(interp, "Tcl initialization error: %s", Tcl_GetStringResult(tclInterp));
416
+ Jim_SetResultFormatted(interp, "Tcl initialization error: %s",
417
+ Tcl_GetStringResult(tclInterp));
397418
Tcl_DeleteInterp(tclInterp);
398419
tclContext->interp = tclInterp = 0;
399420
return JIM_ERR;
400421
}
401
- /* Add the TH1 integration commands to Tcl. */
402
- Tcl_CallWhenDeleted(tclInterp, Th1DeleteProc, interp);
403
- Tcl_CreateObjCommand(tclInterp, "th1Eval", Th1EvalObjCmd, interp, NULL);
404
- Tcl_CreateObjCommand(tclInterp, "th1Expr", Th1ExprObjCmd, interp, NULL);
422
+ /* Add the Jim integration commands to Tcl. */
423
+ Tcl_CallWhenDeleted(tclInterp, BridgeDeleteProc, interp);
424
+ Tcl_CreateObjCommand(tclInterp, "bridgeEval", BridgeEvalObjCmd, interp, NULL);
425
+ Tcl_CreateObjCommand(tclInterp, "bridgeExpr", BridgeExprObjCmd, interp, NULL);
405426
return JIM_OK;
406427
}
407428
408429
/*
409430
** Register the Tcl language commands with interpreter interp.
410431
** Usually this is called soon after interpreter creation.
411432
*/
412
-int th_register_tcl(
433
+int register_tcl(
413434
Jim_Interp *interp,
414435
void *pContext
415436
){
416437
int i;
417
- /* Add the Tcl integration commands to TH1. */
438
+ /* Add the Tcl integration commands to Jim. */
418439
for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
440
+ void *ctx = aCommand[i].pContext;
419441
/* Use Tcl interpreter for context? */
420
- Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, pContext, NULL);
442
+ if( !ctx ) ctx = pContext;
443
+ Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
421444
}
422445
return JIM_OK;
423446
}
424447
425448
#endif /* FOSSIL_ENABLE_TCL */
426449
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -6,11 +6,11 @@
6 ** This program is distributed in the hope that it will be useful,
7 ** but without any warranty; without even the implied warranty of
8 ** merchantability or fitness for a particular purpose.
9 **
10 *******************************************************************************
11 ** This file contains code used to bridge the TH1 and Tcl scripting languages.
12 */
13
14 #include "config.h"
15
16 #ifdef FOSSIL_ENABLE_TCL
@@ -30,23 +30,23 @@
30 #define USE_TCL_EVALOBJV 1
31 #endif
32
33 /*
34 ** These macros are designed to reduce the redundant code required to marshal
35 ** arguments from TH1 to Tcl.
36 */
37 #define USE_ARGV_TO_OBJV() \
38 int objc; \
39 Tcl_Obj **objv; \
40 int i;
41
42 #define COPY_ARGV_TO_OBJV() \
43 objc = argc-1; \
44 objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \
45 for(i=1; i<argc; i++){ \
46 objv[i-1] = Tcl_NewStringObj(Jim_String(argv[i]), Jim_Length(argv[i])); \
47 Tcl_IncrRefCount(objv[i-1]); \
48 }
49
50 #define FREE_ARGV_TO_OBJV() \
51 for(i=1; i<argc; i++){ \
52 Tcl_DecrRefCount(objv[i-1]); \
@@ -59,11 +59,11 @@
59 */
60 #define GET_CTX_TCL_INTERP(ctx) \
61 ((struct TclContext *)(ctx))->interp
62
63 /*
64 ** Creates and initializes a Tcl interpreter for use with the specified TH1
65 ** interpreter. Stores the created Tcl interpreter in the Tcl context supplied
66 ** by the caller. This must be declared here because quite a few functions in
67 ** this file need to use it before it can be defined.
68 */
69 static int createTclInterp(Jim_Interp *interp, void *pContext);
@@ -89,11 +89,11 @@
89 }
90 return Tcl_GetStringFromObj(resultPtr, pN);
91 }
92
93 /*
94 ** Tcl context information used by TH1. This structure definition has been
95 ** copied from and should be kept in sync with the one in "main.c".
96 */
97 struct TclContext {
98 int argc;
99 char **argv;
@@ -103,11 +103,14 @@
103 /*
104 ** Syntax:
105 **
106 ** tclEval arg ?arg ...?
107 */
108 static int tclEval_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv
 
 
 
109 ){
110 Tcl_Interp *tclInterp;
111 Tcl_Obj *objPtr;
112 int rc;
113 int nResult;
@@ -150,11 +153,14 @@
150 /*
151 ** Syntax:
152 **
153 ** tclExpr arg ?arg ...?
154 */
155 static int tclExpr_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv
 
 
 
156 ){
157 Tcl_Interp *tclInterp;
158 Tcl_Obj *objPtr;
159 Tcl_Obj *resultObjPtr;
160 int rc;
@@ -203,11 +209,14 @@
203 /*
204 ** Syntax:
205 **
206 ** tclInvoke command ?arg ...?
207 */
208 static int tclInvoke_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv
 
 
 
209 ){
210 Tcl_Interp *tclInterp;
211 #ifndef USE_TCL_EVALOBJV
212 Tcl_Command command;
213 Tcl_CmdInfo cmdInfo;
@@ -243,11 +252,12 @@
243 Tcl_DecrRefCount(objPtr);
244 Tcl_Release((ClientData)tclInterp);
245 return JIM_ERR;
246 }
247 if( !cmdInfo.objProc ){
248 Jim_SetResultFormatted(interp, "Cannot invoke command not found: %#s", argv[1]);
 
249 Tcl_DecrRefCount(objPtr);
250 Tcl_Release((ClientData)tclInterp);
251 return JIM_ERR;
252 }
253 Tcl_DecrRefCount(objPtr);
@@ -267,108 +277,118 @@
267 }
268
269 /*
270 ** Syntax:
271 **
272 ** th1Eval arg
273 */
274 static int Th1EvalObjCmd(
275 ClientData clientData,
276 Tcl_Interp *interp,
277 int objc,
278 Tcl_Obj *CONST objv[]
279 ){
280 Jim_Interp *th1Interp;
281 int nArg;
282 const char *arg;
283 int rc;
 
 
284
285 if( objc!=2 ){
286 Tcl_WrongNumArgs(interp, 1, objv, "arg");
287 return TCL_ERROR;
288 }
289 th1Interp = (Jim_Interp *)clientData;
290 if( !th1Interp ){
291 Tcl_AppendResult(interp, "invalid TH1 interpreter", NULL);
292 return TCL_ERROR;
293 }
294 arg = Tcl_GetStringFromObj(objv[1], &nArg);
295 rc = Jim_Eval(th1Interp, arg);
296 arg = Jim_String(Jim_GetResult(th1Interp));
297 Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, -1));
 
 
 
 
298 return rc;
299 }
300
301 /*
302 ** Syntax:
303 **
304 ** th1Expr arg
305 */
306 static int Th1ExprObjCmd(
307 ClientData clientData,
308 Tcl_Interp *interp,
309 int objc,
310 Tcl_Obj *CONST objv[]
311 ){
312 Jim_Interp *th1Interp;
313 int nArg;
314 const char *arg;
315 int rc;
316 Jim_Obj *exprResultObj;
 
317
318 if( objc!=2 ){
319 Tcl_WrongNumArgs(interp, 1, objv, "arg");
320 return TCL_ERROR;
321 }
322 th1Interp = (Jim_Interp *)clientData;
323 if( !th1Interp ){
324 Tcl_AppendResult(interp, "invalid TH1 interpreter", NULL);
325 return TCL_ERROR;
326 }
327
328 arg = Tcl_GetStringFromObj(objv[1], &nArg);
329 rc = Jim_EvalExpression(th1Interp, Jim_NewStringObj(th1Interp, arg, -1), &exprResultObj);
 
 
 
330 if (rc == JIM_OK) {
331 arg = Jim_String(exprResultObj);
332 Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, -1));
333 }
334
335 return rc;
336 }
337
338 /*
339 ** Array of Tcl integration commands. Used when adding or removing the Tcl
340 ** integration commands from TH1.
341 */
342 static struct _Command {
343 const char *zName;
344 Jim_CmdProc xProc;
 
345 } aCommand[] = {
346 {"tclEval", tclEval_command },
347 {"tclExpr", tclExpr_command },
348 {"tclInvoke", tclInvoke_command},
 
349 };
350
351 /*
352 ** Called if the Tcl interpreter is deleted. Removes the Tcl integration
353 ** commands from the TH1 interpreter.
354 */
355 static void Th1DeleteProc(
356 ClientData clientData,
357 Tcl_Interp *interp
358 ){
359 int i;
360 Jim_Interp *th1Interp = (Jim_Interp *)clientData;
361 if( !th1Interp ) return;
362 /* Remove the Tcl integration commands. */
363 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
364 Jim_DeleteCommand(th1Interp, aCommand[i].zName);
365 }
366 }
367
368 /*
369 ** Creates and initializes a Tcl interpreter for use with the specified TH1
370 ** interpreter. Stores the created Tcl interpreter in the Tcl context supplied
371 ** by the caller.
372 */
373 static int createTclInterp(
374 Jim_Interp *interp,
@@ -391,35 +411,38 @@
391 if( !tclInterp || Tcl_InterpDeleted(tclInterp) ){
392 Jim_SetResultString(interp, "Could not create Tcl interpreter", -1);
393 return JIM_ERR;
394 }
395 if( Tcl_Init(tclInterp)!=TCL_OK ){
396 Jim_SetResultFormatted(interp, "Tcl initialization error: %s", Tcl_GetStringResult(tclInterp));
 
397 Tcl_DeleteInterp(tclInterp);
398 tclContext->interp = tclInterp = 0;
399 return JIM_ERR;
400 }
401 /* Add the TH1 integration commands to Tcl. */
402 Tcl_CallWhenDeleted(tclInterp, Th1DeleteProc, interp);
403 Tcl_CreateObjCommand(tclInterp, "th1Eval", Th1EvalObjCmd, interp, NULL);
404 Tcl_CreateObjCommand(tclInterp, "th1Expr", Th1ExprObjCmd, interp, NULL);
405 return JIM_OK;
406 }
407
408 /*
409 ** Register the Tcl language commands with interpreter interp.
410 ** Usually this is called soon after interpreter creation.
411 */
412 int th_register_tcl(
413 Jim_Interp *interp,
414 void *pContext
415 ){
416 int i;
417 /* Add the Tcl integration commands to TH1. */
418 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
 
419 /* Use Tcl interpreter for context? */
420 Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, pContext, NULL);
 
421 }
422 return JIM_OK;
423 }
424
425 #endif /* FOSSIL_ENABLE_TCL */
426
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -6,11 +6,11 @@
6 ** This program is distributed in the hope that it will be useful,
7 ** but without any warranty; without even the implied warranty of
8 ** merchantability or fitness for a particular purpose.
9 **
10 *******************************************************************************
11 ** This file contains code used to bridge the Jim and Tcl scripting languages.
12 */
13
14 #include "config.h"
15
16 #ifdef FOSSIL_ENABLE_TCL
@@ -30,23 +30,23 @@
30 #define USE_TCL_EVALOBJV 1
31 #endif
32
33 /*
34 ** These macros are designed to reduce the redundant code required to marshal
35 ** arguments from Jim to Tcl.
36 */
37 #define USE_ARGV_TO_OBJV() \
38 int objc; \
39 Tcl_Obj **objv; \
40 int i;
41
42 #define COPY_ARGV_TO_OBJV() \
43 objc = argc-1; \
44 objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \
45 for(i=1; i<argc; i++){ \
46 objv[i-1] = Tcl_NewStringObj(Jim_String(argv[i]), Jim_Length(argv[i])); \
47 Tcl_IncrRefCount(objv[i-1]); \
48 }
49
50 #define FREE_ARGV_TO_OBJV() \
51 for(i=1; i<argc; i++){ \
52 Tcl_DecrRefCount(objv[i-1]); \
@@ -59,11 +59,11 @@
59 */
60 #define GET_CTX_TCL_INTERP(ctx) \
61 ((struct TclContext *)(ctx))->interp
62
63 /*
64 ** Creates and initializes a Tcl interpreter for use with the specified Jim
65 ** interpreter. Stores the created Tcl interpreter in the Tcl context supplied
66 ** by the caller. This must be declared here because quite a few functions in
67 ** this file need to use it before it can be defined.
68 */
69 static int createTclInterp(Jim_Interp *interp, void *pContext);
@@ -89,11 +89,11 @@
89 }
90 return Tcl_GetStringFromObj(resultPtr, pN);
91 }
92
93 /*
94 ** Tcl context information used by Jim. This structure definition has been
95 ** copied from and should be kept in sync with the one in "main.c".
96 */
97 struct TclContext {
98 int argc;
99 char **argv;
@@ -103,11 +103,14 @@
103 /*
104 ** Syntax:
105 **
106 ** tclEval arg ?arg ...?
107 */
108 static int tclEval_command(
109 Jim_Interp *interp,
110 int argc,
111 Jim_Obj *const *argv
112 ){
113 Tcl_Interp *tclInterp;
114 Tcl_Obj *objPtr;
115 int rc;
116 int nResult;
@@ -150,11 +153,14 @@
153 /*
154 ** Syntax:
155 **
156 ** tclExpr arg ?arg ...?
157 */
158 static int tclExpr_command(
159 Jim_Interp *interp,
160 int argc,
161 Jim_Obj *const *argv
162 ){
163 Tcl_Interp *tclInterp;
164 Tcl_Obj *objPtr;
165 Tcl_Obj *resultObjPtr;
166 int rc;
@@ -203,11 +209,14 @@
209 /*
210 ** Syntax:
211 **
212 ** tclInvoke command ?arg ...?
213 */
214 static int tclInvoke_command(
215 Jim_Interp *interp,
216 int argc,
217 Jim_Obj *const *argv
218 ){
219 Tcl_Interp *tclInterp;
220 #ifndef USE_TCL_EVALOBJV
221 Tcl_Command command;
222 Tcl_CmdInfo cmdInfo;
@@ -243,11 +252,12 @@
252 Tcl_DecrRefCount(objPtr);
253 Tcl_Release((ClientData)tclInterp);
254 return JIM_ERR;
255 }
256 if( !cmdInfo.objProc ){
257 Jim_SetResultFormatted(interp, "Cannot invoke command not found: %#s",
258 argv[1]);
259 Tcl_DecrRefCount(objPtr);
260 Tcl_Release((ClientData)tclInterp);
261 return JIM_ERR;
262 }
263 Tcl_DecrRefCount(objPtr);
@@ -267,108 +277,118 @@
277 }
278
279 /*
280 ** Syntax:
281 **
282 ** bridgeEval arg
283 */
284 static int BridgeEvalObjCmd(
285 ClientData clientData,
286 Tcl_Interp *interp,
287 int objc,
288 Tcl_Obj *CONST objv[]
289 ){
290 Jim_Interp *jimInterp;
291 int nArg;
292 const char *arg;
293 int rc;
294 Jim_Obj *argObj;
295 Jim_Obj *resultObj;
296
297 if( objc!=2 ){
298 Tcl_WrongNumArgs(interp, 1, objv, "arg");
299 return TCL_ERROR;
300 }
301 jimInterp = (Jim_Interp *)clientData;
302 if( !jimInterp ){
303 Tcl_AppendResult(interp, "invalid bridge interpreter", NULL);
304 return TCL_ERROR;
305 }
306 arg = Tcl_GetStringFromObj(objv[1], &nArg);
307 argObj = Jim_NewStringObj(jimInterp, arg, nArg);
308 Jim_IncrRefCount(argObj);
309 rc = Jim_EvalObj(jimInterp, argObj);
310 Jim_DecrRefCount(jimInterp, argObj);
311 resultObj = Jim_GetResult(jimInterp);
312 arg = Jim_GetString(resultObj, &nArg);
313 Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg));
314 return rc;
315 }
316
317 /*
318 ** Syntax:
319 **
320 ** bridgeExpr arg
321 */
322 static int BridgeExprObjCmd(
323 ClientData clientData,
324 Tcl_Interp *interp,
325 int objc,
326 Tcl_Obj *CONST objv[]
327 ){
328 Jim_Interp *jimInterp;
329 int nArg;
330 const char *arg;
331 int rc;
332 Jim_Obj *argObj;
333 Jim_Obj *resultObj;
334
335 if( objc!=2 ){
336 Tcl_WrongNumArgs(interp, 1, objv, "arg");
337 return TCL_ERROR;
338 }
339 jimInterp = (Jim_Interp *)clientData;
340 if( !jimInterp ){
341 Tcl_AppendResult(interp, "invalid bridge interpreter", NULL);
342 return TCL_ERROR;
343 }
 
344 arg = Tcl_GetStringFromObj(objv[1], &nArg);
345 argObj = Jim_NewStringObj(jimInterp, arg, nArg);
346 Jim_IncrRefCount(argObj);
347 rc = Jim_EvalExpression(jimInterp, argObj, &resultObj);
348 Jim_DecrRefCount(jimInterp, argObj);
349 if (rc == JIM_OK) {
350 arg = Jim_GetString(resultObj, &nArg);
351 Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg));
352 }
 
353 return rc;
354 }
355
356 /*
357 ** Array of Tcl integration commands. Used when adding or removing the Tcl
358 ** integration commands from Jim.
359 */
360 static struct _Command {
361 const char *zName;
362 Jim_CmdProc xProc;
363 void *pContext;
364 } aCommand[] = {
365 {"tclEval", tclEval_command, 0},
366 {"tclExpr", tclExpr_command, 0},
367 {"tclInvoke", tclInvoke_command, 0},
368 {0, 0, 0}
369 };
370
371 /*
372 ** Called if the Tcl interpreter is deleted. Removes the Tcl integration
373 ** commands from the Jim interpreter.
374 */
375 static void BridgeDeleteProc(
376 ClientData clientData,
377 Tcl_Interp *interp
378 ){
379 int i;
380 Jim_Interp *jimInterp = (Jim_Interp *)clientData;
381 if( !jimInterp ) return;
382 /* Remove the Tcl integration commands. */
383 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
384 Jim_DeleteCommand(jimInterp, aCommand[i].zName);
385 }
386 }
387
388 /*
389 ** Creates and initializes a Tcl interpreter for use with the specified Jim
390 ** interpreter. Stores the created Tcl interpreter in the Tcl context supplied
391 ** by the caller.
392 */
393 static int createTclInterp(
394 Jim_Interp *interp,
@@ -391,35 +411,38 @@
411 if( !tclInterp || Tcl_InterpDeleted(tclInterp) ){
412 Jim_SetResultString(interp, "Could not create Tcl interpreter", -1);
413 return JIM_ERR;
414 }
415 if( Tcl_Init(tclInterp)!=TCL_OK ){
416 Jim_SetResultFormatted(interp, "Tcl initialization error: %s",
417 Tcl_GetStringResult(tclInterp));
418 Tcl_DeleteInterp(tclInterp);
419 tclContext->interp = tclInterp = 0;
420 return JIM_ERR;
421 }
422 /* Add the Jim integration commands to Tcl. */
423 Tcl_CallWhenDeleted(tclInterp, BridgeDeleteProc, interp);
424 Tcl_CreateObjCommand(tclInterp, "bridgeEval", BridgeEvalObjCmd, interp, NULL);
425 Tcl_CreateObjCommand(tclInterp, "bridgeExpr", BridgeExprObjCmd, interp, NULL);
426 return JIM_OK;
427 }
428
429 /*
430 ** Register the Tcl language commands with interpreter interp.
431 ** Usually this is called soon after interpreter creation.
432 */
433 int register_tcl(
434 Jim_Interp *interp,
435 void *pContext
436 ){
437 int i;
438 /* Add the Tcl integration commands to Jim. */
439 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
440 void *ctx = aCommand[i].pContext;
441 /* Use Tcl interpreter for context? */
442 if( !ctx ) ctx = pContext;
443 Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
444 }
445 return JIM_OK;
446 }
447
448 #endif /* FOSSIL_ENABLE_TCL */
449
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -24,11 +24,11 @@
2424
2525
set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test.
2626
2727
###############################################################################
2828
29
-fossil test-th-render [file nativename [file join $dir th1-tcl1.txt]]
29
+fossil test-script-render [file nativename [file join $dir th1-tcl1.txt]]
3030
3131
test th1-tcl-1 {[regexp -- {^\d+
3232
\d+
3333
\d+
3434
via Tcl invoke
@@ -48,55 +48,55 @@
4848
three words now
4949
$} [string map [list \r\n \n] $RESULT]]}
5050
5151
###############################################################################
5252
53
-fossil test-th-render [file nativename [file join $dir th1-tcl2.txt]]
53
+fossil test-script-render [file nativename [file join $dir th1-tcl2.txt]]
5454
5555
test th1-tcl-2 {[regexp -- {^\d+
5656
$} [string map [list \r\n \n] $RESULT]]}
5757
5858
###############################################################################
5959
60
-fossil test-th-render [file nativename [file join $dir th1-tcl3.txt]]
60
+fossil test-script-render [file nativename [file join $dir th1-tcl3.txt]]
6161
6262
test th1-tcl-3 {$RESULT eq {<hr><p class="thmainError">ERROR:\
6363
invalid command name &quot;bad_command&quot;</p>}}
6464
6565
###############################################################################
6666
67
-fossil test-th-render [file nativename [file join $dir th1-tcl4.txt]]
67
+fossil test-script-render [file nativename [file join $dir th1-tcl4.txt]]
6868
6969
test th1-tcl-4 {$RESULT eq {<hr><p class="thmainError">ERROR:\
7070
divide by zero</p>}}
7171
7272
###############################################################################
7373
74
-fossil test-th-render [file nativename [file join $dir th1-tcl5.txt]]
74
+fossil test-script-render [file nativename [file join $dir th1-tcl5.txt]]
7575
7676
test th1-tcl-5 {$RESULT eq {<hr><p class="thmainError">ERROR:\
7777
Tcl command not found: bad_command</p>} || $RESULT eq {<hr><p\
7878
class="thmainError">ERROR: invalid command name &quot;bad_command&quot;</p>}}
7979
8080
###############################################################################
8181
82
-fossil test-th-render [file nativename [file join $dir th1-tcl6.txt]]
82
+fossil test-script-render [file nativename [file join $dir th1-tcl6.txt]]
8383
8484
test th1-tcl-6 {$RESULT eq {<hr><p class="thmainError">ERROR:\
8585
no such command: bad_command</p>}}
8686
8787
###############################################################################
8888
89
-fossil test-th-render [file nativename [file join $dir th1-tcl7.txt]]
89
+fossil test-script-render [file nativename [file join $dir th1-tcl7.txt]]
9090
9191
test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\
9292
syntax error in expression: &quot;2**0&quot;</p>}}
9393
9494
###############################################################################
9595
96
-fossil test-th-render [file nativename [file join $dir th1-tcl8.txt]]
96
+fossil test-script-render [file nativename [file join $dir th1-tcl8.txt]]
9797
9898
test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\
9999
Cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr><p\
100100
class="thmainError">ERROR: tailcall can only be called from a proc or\
101101
lambda</p>}}
102102
103103
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -24,11 +24,11 @@
24
25 set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test.
26
27 ###############################################################################
28
29 fossil test-th-render [file nativename [file join $dir th1-tcl1.txt]]
30
31 test th1-tcl-1 {[regexp -- {^\d+
32 \d+
33 \d+
34 via Tcl invoke
@@ -48,55 +48,55 @@
48 three words now
49 $} [string map [list \r\n \n] $RESULT]]}
50
51 ###############################################################################
52
53 fossil test-th-render [file nativename [file join $dir th1-tcl2.txt]]
54
55 test th1-tcl-2 {[regexp -- {^\d+
56 $} [string map [list \r\n \n] $RESULT]]}
57
58 ###############################################################################
59
60 fossil test-th-render [file nativename [file join $dir th1-tcl3.txt]]
61
62 test th1-tcl-3 {$RESULT eq {<hr><p class="thmainError">ERROR:\
63 invalid command name &quot;bad_command&quot;</p>}}
64
65 ###############################################################################
66
67 fossil test-th-render [file nativename [file join $dir th1-tcl4.txt]]
68
69 test th1-tcl-4 {$RESULT eq {<hr><p class="thmainError">ERROR:\
70 divide by zero</p>}}
71
72 ###############################################################################
73
74 fossil test-th-render [file nativename [file join $dir th1-tcl5.txt]]
75
76 test th1-tcl-5 {$RESULT eq {<hr><p class="thmainError">ERROR:\
77 Tcl command not found: bad_command</p>} || $RESULT eq {<hr><p\
78 class="thmainError">ERROR: invalid command name &quot;bad_command&quot;</p>}}
79
80 ###############################################################################
81
82 fossil test-th-render [file nativename [file join $dir th1-tcl6.txt]]
83
84 test th1-tcl-6 {$RESULT eq {<hr><p class="thmainError">ERROR:\
85 no such command: bad_command</p>}}
86
87 ###############################################################################
88
89 fossil test-th-render [file nativename [file join $dir th1-tcl7.txt]]
90
91 test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\
92 syntax error in expression: &quot;2**0&quot;</p>}}
93
94 ###############################################################################
95
96 fossil test-th-render [file nativename [file join $dir th1-tcl8.txt]]
97
98 test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\
99 Cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr><p\
100 class="thmainError">ERROR: tailcall can only be called from a proc or\
101 lambda</p>}}
102
103
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -24,11 +24,11 @@
24
25 set env(TH1_ENABLE_TCL) 1; # Tcl integration must be enabled for this test.
26
27 ###############################################################################
28
29 fossil test-script-render [file nativename [file join $dir th1-tcl1.txt]]
30
31 test th1-tcl-1 {[regexp -- {^\d+
32 \d+
33 \d+
34 via Tcl invoke
@@ -48,55 +48,55 @@
48 three words now
49 $} [string map [list \r\n \n] $RESULT]]}
50
51 ###############################################################################
52
53 fossil test-script-render [file nativename [file join $dir th1-tcl2.txt]]
54
55 test th1-tcl-2 {[regexp -- {^\d+
56 $} [string map [list \r\n \n] $RESULT]]}
57
58 ###############################################################################
59
60 fossil test-script-render [file nativename [file join $dir th1-tcl3.txt]]
61
62 test th1-tcl-3 {$RESULT eq {<hr><p class="thmainError">ERROR:\
63 invalid command name &quot;bad_command&quot;</p>}}
64
65 ###############################################################################
66
67 fossil test-script-render [file nativename [file join $dir th1-tcl4.txt]]
68
69 test th1-tcl-4 {$RESULT eq {<hr><p class="thmainError">ERROR:\
70 divide by zero</p>}}
71
72 ###############################################################################
73
74 fossil test-script-render [file nativename [file join $dir th1-tcl5.txt]]
75
76 test th1-tcl-5 {$RESULT eq {<hr><p class="thmainError">ERROR:\
77 Tcl command not found: bad_command</p>} || $RESULT eq {<hr><p\
78 class="thmainError">ERROR: invalid command name &quot;bad_command&quot;</p>}}
79
80 ###############################################################################
81
82 fossil test-script-render [file nativename [file join $dir th1-tcl6.txt]]
83
84 test th1-tcl-6 {$RESULT eq {<hr><p class="thmainError">ERROR:\
85 no such command: bad_command</p>}}
86
87 ###############################################################################
88
89 fossil test-script-render [file nativename [file join $dir th1-tcl7.txt]]
90
91 test th1-tcl-7 {$RESULT eq {<hr><p class="thmainError">ERROR:\
92 syntax error in expression: &quot;2**0&quot;</p>}}
93
94 ###############################################################################
95
96 fossil test-script-render [file nativename [file join $dir th1-tcl8.txt]]
97
98 test th1-tcl-8 {$RESULT eq {<hr><p class="thmainError">ERROR:\
99 Cannot invoke Tcl command: tailcall</p>} || $RESULT eq {<hr><p\
100 class="thmainError">ERROR: tailcall can only be called from a proc or\
101 lambda</p>}}
102
103
--- test/th1-tcl1.txt
+++ test/th1-tcl1.txt
@@ -1,10 +1,10 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
set channel stdout; tclInvoke set channel $channel
88
proc doOut {msg} {puts $msg; puts \n}
99
doOut [tclEval clock seconds]
1010
doOut [tclEval {set x [clock seconds]}]
@@ -14,14 +14,14 @@
1414
doOut [tclExpr 2 + 2]
1515
doOut [tclInvoke set x "two words"]
1616
doOut [tclInvoke eval set y one_word]
1717
doOut [tclInvoke eval {set z "three words now"}]
1818
doOut [set x [tclEval {set x [clock seconds]}]]
19
- doOut [tclInvoke th1Eval {set y "two words"}]
20
- doOut [set z [tclInvoke th1Expr {2+2}]]
19
+ doOut [tclInvoke bridgeEval {set y "two words"}]
20
+ doOut [set z [tclInvoke bridgeExpr {2+2}]]
2121
doOut $x
2222
doOut $y
2323
doOut $z
2424
doOut [tclEval set x]
2525
doOut [tclEval set y]
2626
doOut [tclEval set z]
2727
</th1>
2828
--- test/th1-tcl1.txt
+++ test/th1-tcl1.txt
@@ -1,10 +1,10 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 set channel stdout; tclInvoke set channel $channel
8 proc doOut {msg} {puts $msg; puts \n}
9 doOut [tclEval clock seconds]
10 doOut [tclEval {set x [clock seconds]}]
@@ -14,14 +14,14 @@
14 doOut [tclExpr 2 + 2]
15 doOut [tclInvoke set x "two words"]
16 doOut [tclInvoke eval set y one_word]
17 doOut [tclInvoke eval {set z "three words now"}]
18 doOut [set x [tclEval {set x [clock seconds]}]]
19 doOut [tclInvoke th1Eval {set y "two words"}]
20 doOut [set z [tclInvoke th1Expr {2+2}]]
21 doOut $x
22 doOut $y
23 doOut $z
24 doOut [tclEval set x]
25 doOut [tclEval set y]
26 doOut [tclEval set z]
27 </th1>
28
--- test/th1-tcl1.txt
+++ test/th1-tcl1.txt
@@ -1,10 +1,10 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 set channel stdout; tclInvoke set channel $channel
8 proc doOut {msg} {puts $msg; puts \n}
9 doOut [tclEval clock seconds]
10 doOut [tclEval {set x [clock seconds]}]
@@ -14,14 +14,14 @@
14 doOut [tclExpr 2 + 2]
15 doOut [tclInvoke set x "two words"]
16 doOut [tclInvoke eval set y one_word]
17 doOut [tclInvoke eval {set z "three words now"}]
18 doOut [set x [tclEval {set x [clock seconds]}]]
19 doOut [tclInvoke bridgeEval {set y "two words"}]
20 doOut [set z [tclInvoke bridgeExpr {2+2}]]
21 doOut $x
22 doOut $y
23 doOut $z
24 doOut [tclEval set x]
25 doOut [tclEval set y]
26 doOut [tclEval set z]
27 </th1>
28
--- test/th1-tcl2.txt
+++ test/th1-tcl2.txt
@@ -1,10 +1,10 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
# NOTE: This test requires that the SQLite package be available for the Tcl
88
# interpreter that is linked to the Fossil executable.
99
#
1010
tclInvoke set repository_name [repository 1]
1111
--- test/th1-tcl2.txt
+++ test/th1-tcl2.txt
@@ -1,10 +1,10 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 # NOTE: This test requires that the SQLite package be available for the Tcl
8 # interpreter that is linked to the Fossil executable.
9 #
10 tclInvoke set repository_name [repository 1]
11
--- test/th1-tcl2.txt
+++ test/th1-tcl2.txt
@@ -1,10 +1,10 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 # NOTE: This test requires that the SQLite package be available for the Tcl
8 # interpreter that is linked to the Fossil executable.
9 #
10 tclInvoke set repository_name [repository 1]
11
--- test/th1-tcl3.txt
+++ test/th1-tcl3.txt
@@ -1,9 +1,9 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
proc doOut {msg} {puts $msg; puts \n}
88
doOut [tclEval bad_command]
99
</th1>
1010
--- test/th1-tcl3.txt
+++ test/th1-tcl3.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclEval bad_command]
9 </th1>
10
--- test/th1-tcl3.txt
+++ test/th1-tcl3.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclEval bad_command]
9 </th1>
10
--- test/th1-tcl4.txt
+++ test/th1-tcl4.txt
@@ -1,9 +1,9 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
proc doOut {msg} {puts $msg; puts \n}
88
doOut [tclExpr 2/0]
99
</th1>
1010
--- test/th1-tcl4.txt
+++ test/th1-tcl4.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclExpr 2/0]
9 </th1>
10
--- test/th1-tcl4.txt
+++ test/th1-tcl4.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclExpr 2/0]
9 </th1>
10
--- test/th1-tcl5.txt
+++ test/th1-tcl5.txt
@@ -1,9 +1,9 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
proc doOut {msg} {puts $msg; puts \n}
88
doOut [tclInvoke bad_command]
99
</th1>
1010
--- test/th1-tcl5.txt
+++ test/th1-tcl5.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclInvoke bad_command]
9 </th1>
10
--- test/th1-tcl5.txt
+++ test/th1-tcl5.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclInvoke bad_command]
9 </th1>
10
--- test/th1-tcl6.txt
+++ test/th1-tcl6.txt
@@ -1,9 +1,9 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
proc doOut {msg} {puts $msg; puts \n}
8
- doOut [tclEval th1Eval bad_command]
8
+ doOut [tclEval bridgeEval bad_command]
99
</th1>
1010
--- test/th1-tcl6.txt
+++ test/th1-tcl6.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclEval th1Eval bad_command]
9 </th1>
10
--- test/th1-tcl6.txt
+++ test/th1-tcl6.txt
@@ -1,9 +1,9 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8 doOut [tclEval bridgeEval bad_command]
9 </th1>
10
--- test/th1-tcl7.txt
+++ test/th1-tcl7.txt
@@ -1,19 +1,19 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
proc doOut {msg} {puts $msg; puts \n}
88
99
#
1010
# BUGBUG: Attempting to divide by zero will crash TH1 with the error:
1111
# "child killed: floating-point exception"
1212
#
13
- # doOut [tclEval th1Expr 2/0]
13
+ # doOut [tclEval bridgeExpr 2/0]
1414
1515
#
1616
# NOTE: For now, just cause an expression syntax error.
1717
#
18
- doOut [tclEval th1Expr 2**0]
18
+ doOut [tclEval bridgeExpr 2**0]
1919
</th1>
2020
--- test/th1-tcl7.txt
+++ test/th1-tcl7.txt
@@ -1,19 +1,19 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8
9 #
10 # BUGBUG: Attempting to divide by zero will crash TH1 with the error:
11 # "child killed: floating-point exception"
12 #
13 # doOut [tclEval th1Expr 2/0]
14
15 #
16 # NOTE: For now, just cause an expression syntax error.
17 #
18 doOut [tclEval th1Expr 2**0]
19 </th1>
20
--- test/th1-tcl7.txt
+++ test/th1-tcl7.txt
@@ -1,19 +1,19 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8
9 #
10 # BUGBUG: Attempting to divide by zero will crash TH1 with the error:
11 # "child killed: floating-point exception"
12 #
13 # doOut [tclEval bridgeExpr 2/0]
14
15 #
16 # NOTE: For now, just cause an expression syntax error.
17 #
18 doOut [tclEval bridgeExpr 2**0]
19 </th1>
20
--- test/th1-tcl8.txt
+++ test/th1-tcl8.txt
@@ -1,10 +1,10 @@
11
<th1>
22
#
3
- # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4
- # The corresponding test file executes this file using the test-th-render
5
- # Fossil command.
3
+ # This is a "script fragment" used to test the Tcl integration features of
4
+ # Fossil. The corresponding test file executes this file using the
5
+ # test-script-render Fossil command.
66
#
77
proc doOut {msg} {puts $msg; puts \n}
88
99
if {[tclInvoke set tcl_version] >= 8.6} {
1010
doOut [tclInvoke tailcall set x 1]
1111
--- test/th1-tcl8.txt
+++ test/th1-tcl8.txt
@@ -1,10 +1,10 @@
1 <th1>
2 #
3 # This is a "TH1 fragment" used to test the Tcl integration features of TH1.
4 # The corresponding test file executes this file using the test-th-render
5 # Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8
9 if {[tclInvoke set tcl_version] >= 8.6} {
10 doOut [tclInvoke tailcall set x 1]
11
--- test/th1-tcl8.txt
+++ test/th1-tcl8.txt
@@ -1,10 +1,10 @@
1 <th1>
2 #
3 # This is a "script fragment" used to test the Tcl integration features of
4 # Fossil. The corresponding test file executes this file using the
5 # test-script-render Fossil command.
6 #
7 proc doOut {msg} {puts $msg; puts \n}
8
9 if {[tclInvoke set tcl_version] >= 8.6} {
10 doOut [tclInvoke tailcall set x 1]
11
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -423,11 +423,11 @@
423423
$(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME)
424424
425425
$(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION)
426426
$(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
427427
428
-EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o
428
+EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/jimtcl.o
429429
430430
ifdef FOSSIL_ENABLE_TCL
431431
EXTRAOBJ += $(OBJDIR)/th_tcl.o
432432
endif
433433
@@ -452,11 +452,11 @@
452452
453453
454454
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
455455
$(MKINDEX) $(TRANS_SRC) >$@
456456
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
457
- $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
457
+ $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(OBJDIR)/VERSION.h
458458
echo Done >$(OBJDIR)/headers
459459
460460
$(OBJDIR)/headers: Makefile
461461
Makefile:
462462
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -1037,16 +1037,13 @@
10371037
$(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT2 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
10381038
10391039
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
10401040
$(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
10411041
1042
-$(OBJDIR)/th.o: $(SRCDIR)/th.c
1043
- $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1044
-
1045
-$(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1046
- $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o $(OBJDIR)/th_lang.o
1042
+$(OBJDIR)/jimtcl.o: $(SRCDIR)/../autosetup/jimsh0.c
1043
+ $(XTCC) -I$(SRCDIR) -DJIM_BOOTSTRAP_LIB_ONLY -c $(SRCDIR)/../autosetup/jimsh0.c -o $(OBJDIR)/jimtcl.o
10471044
10481045
ifdef FOSSIL_ENABLE_TCL
10491046
$(OBJDIR)/th_tcl.o: $(SRCDIR)/th_tcl.c
10501047
$(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_tcl.c -o $(OBJDIR)/th_tcl.o
10511048
endif
10521049
10531050
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -423,11 +423,11 @@
423 $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME)
424
425 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION)
426 $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
427
428 EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o
429
430 ifdef FOSSIL_ENABLE_TCL
431 EXTRAOBJ += $(OBJDIR)/th_tcl.o
432 endif
433
@@ -452,11 +452,11 @@
452
453
454 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
455 $(MKINDEX) $(TRANS_SRC) >$@
456 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
457 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
458 echo Done >$(OBJDIR)/headers
459
460 $(OBJDIR)/headers: Makefile
461 Makefile:
462 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -1037,16 +1037,13 @@
1037 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT2 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1038
1039 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1040 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1041
1042 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1043 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th.c -o $(OBJDIR)/th.o
1044
1045 $(OBJDIR)/th_lang.o: $(SRCDIR)/th_lang.c
1046 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_lang.c -o $(OBJDIR)/th_lang.o
1047
1048 ifdef FOSSIL_ENABLE_TCL
1049 $(OBJDIR)/th_tcl.o: $(SRCDIR)/th_tcl.c
1050 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_tcl.c -o $(OBJDIR)/th_tcl.o
1051 endif
1052
1053
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -423,11 +423,11 @@
423 $(TCLSH) $(SRCDIR)/../test/tester.tcl $(APPNAME)
424
425 $(OBJDIR)/VERSION.h: $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(VERSION)
426 $(VERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$(OBJDIR)/VERSION.h
427
428 EXTRAOBJ = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o $(OBJDIR)/jimtcl.o
429
430 ifdef FOSSIL_ENABLE_TCL
431 EXTRAOBJ += $(OBJDIR)/th_tcl.o
432 endif
433
@@ -452,11 +452,11 @@
452
453
454 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
455 $(MKINDEX) $(TRANS_SRC) >$@
456 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
457 $(MAKEHEADERS) $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h $(OBJDIR)/name_.c:$(OBJDIR)/name.h $(OBJDIR)/path_.c:$(OBJDIR)/path.h $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(OBJDIR)/VERSION.h
458 echo Done >$(OBJDIR)/headers
459
460 $(OBJDIR)/headers: Makefile
461 Makefile:
462 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -1037,16 +1037,13 @@
1037 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT2 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1038
1039 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1040 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1041
1042 $(OBJDIR)/jimtcl.o: $(SRCDIR)/../autosetup/jimsh0.c
1043 $(XTCC) -I$(SRCDIR) -DJIM_BOOTSTRAP_LIB_ONLY -c $(SRCDIR)/../autosetup/jimsh0.c -o $(OBJDIR)/jimtcl.o
 
 
 
1044
1045 ifdef FOSSIL_ENABLE_TCL
1046 $(OBJDIR)/th_tcl.o: $(SRCDIR)/th_tcl.c
1047 $(XTCC) -I$(SRCDIR) -c $(SRCDIR)/th_tcl.c -o $(OBJDIR)/th_tcl.o
1048 endif
1049
1050

Keyboard Shortcuts

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