From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (root@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id RAA03480 for ; Mon, 5 Aug 1996 17:02:52 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id CAA14195; Mon, 5 Aug 1996 02:18:52 -0400 (EDT) Resent-Date: Mon, 5 Aug 1996 02:18:52 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960804231921.ZM10131@candle.brasslantern.com> Date: Sun, 4 Aug 1996 23:19:21 -0700 Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: zsh-workers@math.gatech.edu Subject: Patches since pre3 that are not in pre6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"Qqt-K3.0.jT3.79P1o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1919 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu About a week ago I wrote that there appeared to be some patches from pre3 that didn't make it into pre4, but that I hadn't figured out which ones. I finally had a chance to do so; most of the issues they addressed were patched differently in pre5 or pre6, but a few are still completely missing (all from me, as it turns out). All the following patches are reversed diffs because they're changes made to an older file that are missing from the newer file. Use "patch -p1 -R". All these patch hunks are very short, so I've interspersed commentary. First is a simple change to the cvs compctl-example; it's not essential, but it looks more consistent with the rest of the function. --- zsh-3.0-pre3-work/Misc/compctl-examples Mon Jul 15 10:46:51 1996 +++ zsh-3.0-pre4/Misc/compctl-examples Sat Jul 27 08:52:55 1996 @@ -439,9 +439,8 @@ pref= fi [[ -n "$pref" && "$pref" != */ ]] && pref=$pref/ - if [[ -f ${pref}CVS/Entries ]] - then - reply=( "${pref}${^${${(f@)$(<${pref}CVS/Entries)}#/}%%/*}" + if [[ -f "${pref}CVS/Entries" ]] then + reply=( "${pref}${^${${(f@)$(< ${pref}CVS/Entries)}#/}%%/*}" ${pref}*/**/CVS(:h) ) else reply=( ${pref}*/**/CVS(:h) ) Next is my change to ignore "insignificant" white space in case patterns, approximately as per POSIX. I don't *think* this was fixed in any other way between pre4 and pre6; the ChangeLog doesn't mention it. --- zsh-3.0-pre3-work/Src/lex.c Mon Jul 22 14:38:56 1996 +++ zsh-3.0-pre4/Src/lex.c Sat Jul 27 08:52:56 1996 @@ -638,10 +635,6 @@ if (inblank(c) && !in_brace_param && !pct) act = LX2_BREAK; else { - if (incasepat && pct == 1 && !in_brace_param && iblank(c)) { - c = hgetc(); - continue; - } act = lexact2[STOUC(c)]; c = lextok2[STOUC(c)]; } Finally, there's this little tweak to avoid wandering off the end of a string during subsitution if the string happens not to contain 'endchar' anywhere. The current code will spit out a warning message upon crossing the string terminator when DEBUG is defined, but otherwise it silently goes off into never-never land. Maybe this is an "impossible" condition, but if we're going to bother producing a debug message, shouldn't we also avoid creating the wild pointer? --- zsh-3.0-pre3-work/Src/subst.c Fri Jul 19 13:05:37 1996 +++ zsh-3.0-pre4/Src/subst.c Sat Jul 27 08:52:56 1996 @@ -137,9 +137,8 @@ endchar = *str; *str = '\0'; - while (*++str && *str != endchar) - ; - DPUTS(!*str, "Oops. parse error in command substitution"); + while (*++str != endchar) + DPUTS(!*str, "Oops. parse error in command substitution"); } *str++ = '\0'; if (endchar == Outpar && str2[1] == '(' && str[-2] == ')') { Again, these are reversed diffs, so the interesting lines are the ones with the '-' prefix. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"