delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/18/20:47:58

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
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20020219010636.21380.qmail@web21206.mail.yahoo.com>
Date: Mon, 18 Feb 2002 17:06:36 -0800 (PST)
From: AJ Reins <tbisp AT yahoo DOT com>
Subject: Proposed patch for bash (completion spec problem related)
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

Possible patch for bash to fix the problem noticed by Jason Tishler in msg:
http://sources.redhat.com/ml/cygwin/2002-02/msg00581.html


--- subst.c.old	Mon Nov  5 07:19:50 2001
+++ subst.c	Mon Feb 18 16:58:50 2002
@@ -1339,7 +1339,7 @@
 	break;
 
       i = te /* + member (string[te], d) */;
-      while (member (string[i], d) && whitespace(string[i]))
+      while (member (string[i], d)/* && whitespace(string[i])*/)
 	i++;
 
       if (string[i])

If you are curious, it was stepping to the end of the first word in the string, and then
getting stuck on the newline character until everything falls apart around its ears.
At this point d(a character pointer variable) points at <space><tab><newline> and
string[i] is a <newline> while the macro whitespace only returns true if the character
is space or tab. OOPS!


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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