This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix self-destructing Insight installation!


> -----Original Message-----
> From: Dave Korn
> Sent: 05 March 2004 18:41
> To: 'insight'

>   And all of a sudden, I got this error message, and insight 
> refused to run.
> 
>   I've only managed to capture it in .PNG format, because it 
> was one of those windows that you can't copy+paste code from, 
> but basically what it said was "Can't find a usable 
> main.tcl", then an error report ("extra characters after 
> close-brace") and stack backtrace, followed by the 
> threatening message "This probably means that insight wasn't 
> installed properly".

  Ok, I've solved it.  It was happening because the name of the function I
set a breakpoint on had the word 'option' in it.  The line in the prefs file
was perfectly valid, but in read_prefs it was being matched by an
insufficiently-tight regexp in the main parse-a-line loop of the function.
This regexp was looking for lines beginning with the word 'option', but the
anchor character was omitted.  The enclosed diff fixes the bug and restores
my insight installation to perfect working order.  (Since the diff is so
tiny, I've attached it as well, in case outlook wraps or mangles it).


2004-03-06  Dave Korn  <dk@artimi.com>

	* prefs.tcl (read_prefs): anchor regexp for option
	command lines at start-of-line.

diff -rNpu insight1.0.orig/prefs.tcl insight1.0/prefs.tcl
--- insight1.0.orig/prefs.tcl	2003-09-20 03:45:17.001000000 +0100
+++ insight1.0/prefs.tcl	2004-03-06 23:23:22.634961900 +0000
@@ -92,7 +92,7 @@ proc pref_read {} {
 	    regexp {\[(.*)\]} $line match section
 	  }
 
-	  {[ \t\n]*option.*} {
+	  {^[ \t\n]*option.*} {
 	    set line [string trimleft $line]
 	    eval $line
 	  }



    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....

Attachment: insight-patch.txt
Description: Text document

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]