From: Fernando Nasser <fnasser@cygnus.com>
To: insight@sourceware.cygnus.com, David Taylor <taylor@cygnus.com>,
grante@visi.com, Taruna Gandhi <taruna@cygnus.com>
Subject: Re: PATCH: Fix file name handling when running on Cygwin (REPOST)
Date: Wed, 04 Oct 2000 14:19:00 -0000 [thread overview]
Message-ID: <39DB9EC9.3B81AC17@cygnus.com> (raw)
In-Reply-To: <39DB8058.85DE293F@cygnus.com>
And I made the same mistake on the first patch as well. Here is the correct patch.
Sorry for any inconvenience caused.
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
*** srctextwin.itb Wed Oct 4 17:12:43 2000
--- srctextwin.itb Wed Oct 4 16:32:00 2000
***************
*** 865,876 ****
# has changed.
# ------------------------------------------------------------------
body SrcTextWin::_mtime_changed {filename} {
set f [gdb_find_file $filename]
if {$f == ""} {
set r 1
} else {
! set mtime [file mtime $f]
if {![info exists Stwc($filename:mtime)]} {
debug "no mtime. resetting to zero"
set Stwc($filename:mtime) 0
--- 865,885 ----
# has changed.
# ------------------------------------------------------------------
body SrcTextWin::_mtime_changed {filename} {
+ global tcl_platform
+
set f [gdb_find_file $filename]
if {$f == ""} {
set r 1
} else {
! if {[string compare $tcl_platform(platform) "windows"] == 0} {
! set f [ide_cygwin_path to_win32 $f]
! }
! if {[catch {file mtime $f} mtime]} {
! debug "Could not stat file \"$f\" - \"$mtime\""
! # The return code is not of much significance in this case
! return 1
! }
if {![info exists Stwc($filename:mtime)]} {
debug "no mtime. resetting to zero"
set Stwc($filename:mtime) 0
***************
*** 953,959 ****
return
}
# no source; switch to assembly
! # debug "no source file; switch to assembly"
# We have to update this data here (it is also done by the caller)
# because we want to call mode, which calls mode_set, which calls
--- 962,968 ----
return
}
# no source; switch to assembly
! dbug W "no source file; switch to assembly"
# We have to update this data here (it is also done by the caller)
# because we want to call mode, which calls mode_set, which calls
***************
*** 1206,1212 ****
return 0
} elseif {$result == 1 || $mtime_changed} {
$win delete 0.0 end
! # debug "READING $name"
if {[catch {gdb_loadfile $win $name $Linenums} msg]} {
dbug W "Error opening $name: $msg"
#if {$msg != ""} {
--- 1215,1221 ----
return 0
} elseif {$result == 1 || $mtime_changed} {
$win delete 0.0 end
! debug "READING $name"
if {[catch {gdb_loadfile $win $name $Linenums} msg]} {
dbug W "Error opening $name: $msg"
#if {$msg != ""} {
***************
*** 2068,2074 ****
# METHOD: mode_set - change the source mode
# ------------------------------------------------------------------
body SrcTextWin::mode_set {new_mode {go 1}} {
! # debug "$new_mode"
if {$new_mode != $current(mode)} {
--- 2077,2083 ----
# METHOD: mode_set - change the source mode
# ------------------------------------------------------------------
body SrcTextWin::mode_set {new_mode {go 1}} {
! debug "$new_mode"
if {$new_mode != $current(mode)} {
***************
*** 2510,2517 ****
--- 2519,2528 ----
# NOTES: If you call this and a new widget is created which cannot be
# filled in later due to errors, call UnLoadFromCache.
# -----------------------------------------------------------------------------
+
body SrcTextWin::LoadFromCache {w name asm lib} {
debug "LoadFromCache $w $name $asm"
+ global tcl_platform
upvar ${w}win win
upvar _${w}pane pane
***************
*** 2525,2531 ****
set oldpane $pane
if {[info exists Stwc($full_name:pane)]} {
! #debug "READING CACHE $full_name->$Stwc($full_name:pane)"
set pane $Stwc($full_name:pane)
if {$oldpane != ""} {
$itk_interior.p replace $oldpane $pane
--- 2536,2542 ----
set oldpane $pane
if {[info exists Stwc($full_name:pane)]} {
! debug "READING CACHE $full_name->$Stwc($full_name:pane)"
set pane $Stwc($full_name:pane)
if {$oldpane != ""} {
$itk_interior.p replace $oldpane $pane
***************
*** 2557,2564 ****
# out.
if {$loadingSource} {
! if {[catch {file mtime $name} file_time]} {
! debug "Could not stat file \"$name\" - \"$file_time\""
return -1
} else {
set Stwc($full_name:pane) pane$filenum
--- 2568,2580 ----
# out.
if {$loadingSource} {
! if {[string compare $tcl_platform(platform) "windows"] == 0} {
! set f [ide_cygwin_path to_win32 $name]
! } else {
! set f $name
! }
! if {[catch {file mtime $f} file_time]} {
! debug "Could not stat file \"$f\" - \"$file_time\""
return -1
} else {
set Stwc($full_name:pane) pane$filenum
next prev parent reply other threads:[~2000-10-04 14:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-04 12:09 PATCH: Fix file name handling when running on Cygwin Fernando Nasser
2000-10-04 12:16 ` Syd Polk
2000-10-04 14:19 ` Fernando Nasser [this message]
2000-10-04 14:31 ` PATCH: Fix file name handling when running on Cygwin (REPOST) Syd Polk
2000-10-04 14:37 ` Chris Faylor
2000-10-04 14:42 ` PATCH: Fix file name handling when running on Cygwin(REPOST) Fernando Nasser
2000-10-04 14:28 ` PATCH: Fix file name handling when running on Cygwin Syd Polk
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=39DB9EC9.3B81AC17@cygnus.com \
--to=fnasser@cygnus.com \
--cc=grante@visi.com \
--cc=insight@sourceware.cygnus.com \
--cc=taruna@cygnus.com \
--cc=taylor@cygnus.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).