Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Dave Korn" <dk@artimi.com>
To: <insight@sources.redhat.com>
Cc: <cygwin@cygwin.com>
Subject: [PATCH] Fix self-destructing Insight installation!
Date: Sat, 6 Mar 2004 23:42:17 -0000
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_NextPart_000_0000_01C403D4.A9228B60"
In-Reply-To: 
Message-ID: <NUTMEGc1o8yfogkJXrR000000a1@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 06 Mar 2004 23:42:17.0890 (UTC) FILETIME=[A9246020:01C403D4]

------=_NextPart_000_0000_01C403D4.A9228B60
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

> -----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....

------=_NextPart_000_0000_01C403D4.A9228B60
Content-Type: text/plain;
	name="insight-patch.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="insight-patch.txt"

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
 	  }
=20
-	  {[ \t\n]*option.*} {
+	  {^[ \t\n]*option.*} {
 	    set line [string trimleft $line]
 	    eval $line
 	  }


------=_NextPart_000_0000_01C403D4.A9228B60
Content-Type: text/plain; charset=us-ascii

--
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/
------=_NextPart_000_0000_01C403D4.A9228B60--

