Revision: 42244
http://brlcad.svn.sourceforge.net/brlcad/?rev=42244&view=rev
Author: starseeker
Date: 2011-01-13 15:26:10 +0000 (Thu, 13 Jan 2011)
Log Message:
-----------
<smack> why'd I fix the bwish startup to account for the changes to the
libtclcad logic but not mged? Make mged init look more like the bwish init -
this whole setup probably needs review but mged should at least behave better
now. Archer still isn't happy yet.
Modified Paths:
--------------
brlcad/branches/cmake/src/mged/setup.c
Modified: brlcad/branches/cmake/src/mged/setup.c
===================================================================
--- brlcad/branches/cmake/src/mged/setup.c 2011-01-13 14:58:30 UTC (rev
42243)
+++ brlcad/branches/cmake/src/mged/setup.c 2011-01-13 15:26:10 UTC (rev
42244)
@@ -498,46 +498,19 @@
/* Create the interpreter */
*interpreter = Tcl_CreateInterp();
- /* a two-pass init loop. the first pass just tries default init
- * routines while the second calls tclcad_auto_path() to help it
- * find other, potentially uninstalled, resources.
- */
- while (1) {
-
- /* not called first time through, give Tcl_Init() a chance */
- if (try_auto_path) {
- /* Locate the BRL-CAD-specific Tcl scripts, set the auto_path */
- tclcad_auto_path(*interpreter);
- }
-
- /* Initialize Tcl */
- Tcl_ResetResult(*interpreter);
- if (init_tcl && Tcl_Init(*interpreter) == TCL_ERROR) {
- if (!try_auto_path) {
- try_auto_path=1;
- continue;
- }
+ /* Locate the BRL-CAD-specific Tcl scripts, set the auto_path */
+ tclcad_auto_path(*interpreter);
+
+ /* We've got the paths set, now initialize the interperter */
+ if (Tcl_Init(*interpreter) != TCL_OK) {
bu_log("Tcl_Init ERROR:\n%s\n", Tcl_GetStringResult(*interpreter));
- break;
- }
- init_tcl=0;
+ Tcl_ResetResult(*interpreter);
+ }
- /* Initialize [incr Tcl] */
- if (Tcl_Eval(*interpreter, "package require Itcl") != TCL_OK) {
+ /* Initialize [incr Tcl] */
+ if (Tcl_Eval(*interpreter, "package require Itcl") != TCL_OK) {
bu_log("Itcl_Init ERROR:\n%s\n", Tcl_GetStringResult(*interpreter));
- break;
- }
-
- /* don't actually want to loop forever */
- break;
-
- } /* end iteration over Init() routines that need auto_path */
- Tcl_ResetResult(*interpreter);
-
- /* if we haven't loaded by now, load auto_path so we find our tclscripts */
- if (!try_auto_path) {
- /* Locate the BRL-CAD-specific Tcl scripts */
- tclcad_auto_path(*interpreter);
+ Tcl_ResetResult(*interpreter);
}
/*XXX FIXME: Should not be importing Itcl into the global namespace */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits