From: "Martin M. Hunt" <hunt@redhat.com>
To: "insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: [patch] package handling in main.tcl
Date: Tue, 03 Dec 2002 14:26:00 -0000 [thread overview]
Message-ID: <1038954463.1168.59.camel@Dragon> (raw)
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
2002-12-03 Martin M. Hunt <hunt@redhat.com>
* library/main.tcl: Require package "debug". Make
package loading a bit more robust.
[-- Attachment #2: p --]
[-- Type: text/x-patch, Size: 2438 bytes --]
Index: main.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/main.tcl,v
retrieving revision 1.10
diff -p -r1.10 main.tcl
*** main.tcl 14 Aug 2002 18:10:49 -0000 1.10
--- main.tcl 3 Dec 2002 22:23:57 -0000
*************** if {[info exists auto_path]} {
*** 53,86 ****
}
}
# Require the packages we need. Most are loaded already, but this will catch
# any odd errors... :
- package require Tcl 8.0
- package require Tk 8.0
- package require Itcl 3.0
- package require Itk 3.0
- package require Gdbtk 1.0
- package require combobox 1.0
! namespace import itcl::*
namespace import debug::*
! # Setup iwidgets path, if needed
if {[info exists IWIDGETS_LIBRARY]} {
lappend auto_path $IWIDGETS_LIBRARY
}
!
! if {[catch {package require Iwidgets 3.0} errMsg]} {
! set msg "Could not find the Iwidgets libraries.\n\nGot nameofexec: [info nameofexecutable]\nError(s) were: \n$errMsg"
!
if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
! puts stderr $msg
! } else {
! tk_messageBox -title Error -message $msg -icon error -type ok
}
! exit
}
# Environment variables controlling debugging:
# GDBTK_TRACE
--- 53,89 ----
}
}
+
# Require the packages we need. Most are loaded already, but this will catch
# any odd errors... :
! foreach p {{Tcl 8.0} {Tk 8.0} {Itcl 3.0} {Itk 3.0} {Gdbtk 1.0} {combobox 1.0} {debug 1.0}} {
! if {[catch {package require [lindex $p 0] [lindex $p 1]} msg]} {
! if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
! puts stderr "Error: $msg"
! catch {tk_messageBox -title Error -message $msg -icon error -type ok}
! }
! exit -1
! } else {
! #puts "Loaded [lindex $p 0] $msg"
! }
! }
+ namespace import itcl::*
namespace import debug::*
! # Finally, load Iwidgets
if {[info exists IWIDGETS_LIBRARY]} {
lappend auto_path $IWIDGETS_LIBRARY
}
! if {[catch {package require Iwidgets 3.0} msg]} {
if {![info exists ::env(GDBTK_TEST_RUNNING)] || $::env(GDBTK_TEST_RUNNING) == 0} {
! puts stderr "Error: $msg"
! catch {tk_messageBox -title Error -message $msg -icon error -type ok}
}
! exit -1
}
+
# Environment variables controlling debugging:
# GDBTK_TRACE
reply other threads:[~2002-12-03 22:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1038954463.1168.59.camel@Dragon \
--to=hunt@redhat.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).