Revision: 42386
http://brlcad.svn.sourceforge.net/brlcad/?rev=42386&view=rev
Author: starseeker
Date: 2011-01-17 14:08:06 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
Try using the package require statements for itcl/itk in MGED.
Modified Paths:
--------------
brlcad/trunk/src/mged/attach.c
brlcad/trunk/src/mged/cmd.c
brlcad/trunk/src/mged/setup.c
Modified: brlcad/trunk/src/mged/attach.c
===================================================================
--- brlcad/trunk/src/mged/attach.c 2011-01-17 13:44:40 UTC (rev 42385)
+++ brlcad/trunk/src/mged/attach.c 2011-01-17 14:08:06 UTC (rev 42386)
@@ -37,7 +37,6 @@
#include "tcl.h"
#ifdef HAVE_TK
# include "tk.h"
-# include "itk.h"
#endif
#include "bu.h"
@@ -402,8 +401,8 @@
}
/* Initialize [incr Tk] */
- if (Itk_Init(INTERP) == TCL_ERROR) {
- return TCL_ERROR;
+ if (Tcl_Eval(INTERP, "package require Itk") != TCL_OK) {
+ return TCL_ERROR;
}
/* Import [incr Tk] commands into the global namespace */
Modified: brlcad/trunk/src/mged/cmd.c
===================================================================
--- brlcad/trunk/src/mged/cmd.c 2011-01-17 13:44:40 UTC (rev 42385)
+++ brlcad/trunk/src/mged/cmd.c 2011-01-17 14:08:06 UTC (rev 42386)
@@ -46,8 +46,6 @@
# include "tk.h"
#endif
-#include "itcl.h"
-
#include "bu.h"
#include "vmath.h"
#include "bn.h"
Modified: brlcad/trunk/src/mged/setup.c
===================================================================
--- brlcad/trunk/src/mged/setup.c 2011-01-17 13:44:40 UTC (rev 42385)
+++ brlcad/trunk/src/mged/setup.c 2011-01-17 14:08:06 UTC (rev 42386)
@@ -28,7 +28,6 @@
/* system headers */
#include <stdlib.h>
#include <tcl.h>
-#include <itcl.h>
#include <string.h>
/* common headers */
@@ -484,7 +483,7 @@
int init_tcl = 1;
int init_itcl = 1;
struct bu_vls str;
- const char *name = bu_getprogname();
+ const char *name = bu_argv0_full_path();
/* locate our run-time binary (must be called before Tcl_CreateInterp()) */
if (name) {
@@ -530,7 +529,7 @@
/* Initialize [incr Tcl] */
Tcl_ResetResult(*interpreter);
- if (init_itcl && Itcl_Init(*interpreter) == TCL_ERROR) {
+ 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
@@ -543,7 +542,6 @@
bu_log("Itcl_Init ERROR:\n%s\n", Tcl_GetStringResult(*interpreter));
break;
}
- Tcl_StaticPackage(*interpreter, "Itcl", Itcl_Init, Itcl_SafeInit);
init_itcl=0;
/* don't actually want to loop forever */
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