Quoting Ivan Shmakov <[EMAIL PROTECTED]>:
> Thanks, I've added the following to my program and it seems to
> work correctly.
>
> static void
> ensure_tcl_initialized (void)
> {
> static tcl_initialized_p = 0;
>
> if (! tcl_initialized_p) {
> /* NB: a hack, as per Debian Bug#462409 */
> Tcl_Interp *interp = Tcl_CreateInterp ();
> assert (interp != 0);
> Tcl_DeleteInterp (interp);
> tcl_initialized_p = 1;
> }
>
> /* . */
> }
That's fine, but a simple
Tcl_FindExecutable(NULL);
would work just as well.
Going a bit further,
Tcl_FindExecutable(argv[0]);
in your main() would have the added
benefit of making Tcl's [info nameofexecutable]
command return a correct result.
DGP
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]