Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Tcl only uses argv0 so it is enough to transfer only that one argument. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
7f96a7159942bfd9c8d5ac2c9d7c4026 |
| User & Date: | drh 2012-08-21 14:25:43.935 |
Context
|
2012-08-21
| ||
| 23:45 | Restore the previous Tcl argc/argv handling as all the arguments will be used for the Tcl argv script variable. check-in: c9bb320065 user: mistachkin tags: trunk | |
| 14:27 | Merge all recent trunk changes into the eclipse-project branch. check-in: e2d0fa884a user: drh tags: eclipse-project | |
| 14:25 | Tcl only uses argv0 so it is enough to transfer only that one argument. check-in: 7f96a71599 user: drh tags: trunk | |
| 14:15 | Merge the mingw-w64 compiler warning fixes into trunk. check-in: d89b99e383 user: drh tags: trunk | |
| 13:29 | Tcl only uses argv0, so it's enough to transfer this argument only Closed-Leaf check-in: b82eacd569 user: jan.nijtmans tags: tcl-argv0-only | |
Changes
Changes to src/main.c.
| ︙ | ︙ | |||
84 85 86 87 88 89 90 |
#ifdef FOSSIL_ENABLE_TCL
/*
** All Tcl related context information is in this structure. This structure
** definition has been copied from and should be kept in sync with the one in
** "th_tcl.c".
*/
struct TclContext {
| < | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
#ifdef FOSSIL_ENABLE_TCL
/*
** All Tcl related context information is in this structure. This structure
** definition has been copied from and should be kept in sync with the one in
** "th_tcl.c".
*/
struct TclContext {
char *argv0;
Tcl_Interp *interp;
};
#endif
/*
** All global variables are in this structure.
*/
|
| ︙ | ︙ | |||
410 411 412 413 414 415 416 |
int main(int argc, char **argv){
const char *zCmdName = "unknown";
int idx;
int rc;
int i;
#ifdef FOSSIL_ENABLE_TCL
| < | | 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
int main(int argc, char **argv){
const char *zCmdName = "unknown";
int idx;
int rc;
int i;
#ifdef FOSSIL_ENABLE_TCL
g.tcl.argv0 = argv[0];
g.tcl.interp = 0;
#endif
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
memset(&g, 0, sizeof(g));
g.now = time(0);
g.argc = argc;
|
| ︙ | ︙ |
Changes to src/th_tcl.c.
| ︙ | ︙ | |||
91 92 93 94 95 96 97 |
}
/*
** Tcl context information used by TH1. This structure definition has been
** copied from and should be kept in sync with the one in "main.c".
*/
struct TclContext {
| < | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
}
/*
** Tcl context information used by TH1. This structure definition has been
** copied from and should be kept in sync with the one in "main.c".
*/
struct TclContext {
char *argv0;
Tcl_Interp *interp;
};
/*
** Syntax:
**
** tclEval arg ?arg ...?
|
| ︙ | ︙ | |||
339 340 341 342 343 344 345 | return rc; } /* ** Array of Tcl integration commands. Used when adding or removing the Tcl ** integration commands from TH1. */ | | | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
return rc;
}
/*
** Array of Tcl integration commands. Used when adding or removing the Tcl
** integration commands from TH1.
*/
static const struct _Command {
const char *zName;
Th_CommandProc xProc;
void *pContext;
} aCommand[] = {
{"tclEval", tclEval_command, 0},
{"tclExpr", tclExpr_command, 0},
{"tclInvoke", tclInvoke_command, 0},
|
| ︙ | ︙ | |||
387 388 389 390 391 392 393 |
Th_ErrorMessage(interp,
"Invalid Tcl context", (const char *)"", 0);
return TH_ERROR;
}
if ( tclContext->interp ){
return TH_OK;
}
| | | | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 |
Th_ErrorMessage(interp,
"Invalid Tcl context", (const char *)"", 0);
return TH_ERROR;
}
if ( tclContext->interp ){
return TH_OK;
}
if ( tclContext->argv0 ){
Tcl_FindExecutable(tclContext->argv0);
}
tclInterp = tclContext->interp = Tcl_CreateInterp();
if( !tclInterp || Tcl_InterpDeleted(tclInterp) ){
Th_ErrorMessage(interp,
"Could not create Tcl interpreter", (const char *)"", 0);
return TH_ERROR;
}
|
| ︙ | ︙ |