Revision: 42385
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42385&view=rev
Author:   starseeker
Date:     2011-01-17 13:44:40 +0000 (Mon, 17 Jan 2011)

Log Message:
-----------
Try to move mged's setup.c closer to trunk version.

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-17 13:38:42 UTC (rev 
42384)
+++ brlcad/branches/cmake/src/mged/setup.c      2011-01-17 13:44:40 UTC (rev 
42385)
@@ -522,11 +522,27 @@
        }
        init_tcl=0;
 
+       /* warn if tcl_library isn't set by now */
+       if (try_auto_path) {
+           tclcad_tcl_library(*interpreter);
+       }
+
        /* Initialize [incr Tcl] */
-       if (Tcl_Eval(*interpreter, "package require Itcl") != TCL_OK) {
+       Tcl_ResetResult(*interpreter);
+       if (init_itcl && Tcl_Eval(*interpreter, "package require Itcl") != 
TCL_OK) {
+           if (!try_auto_path) {
+               try_auto_path=1;
+               /* Itcl_Init() leaves initialization in a bad state
+                * and can cause retry failures.  cleanup manually.
+                */
+               Tcl_DeleteCommand(*interpreter, "::itcl::class");
+               Tcl_DeleteNamespace(Tcl_FindNamespace(*interpreter, "::itcl", 
NULL, 0));
+               continue;
+           }
            bu_log("Itcl_Init ERROR:\n%s\n", Tcl_GetStringResult(*interpreter));
            break;
        }
+       init_itcl=0;
 
        /* don't actually want to loop forever */
        break;


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

Reply via email to