delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/06/18:43:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dk AT artimi DOT com>
To: <insight AT sources DOT redhat DOT com>
Cc: <cygwin AT cygwin DOT com>
Subject: [PATCH] Fix self-destructing Insight installation!
Date: Sat, 6 Mar 2004 23:42:17 -0000
MIME-Version: 1.0
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 AT artimi DOT 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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019