zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@math.gatech.edu
Subject: Patches since pre3 that are not in pre6
Date: Sun, 4 Aug 1996 23:19:21 -0700	[thread overview]
Message-ID: <960804231921.ZM10131@candle.brasslantern.com> (raw)

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"


                 reply	other threads:[~1996-08-05  7:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=960804231921.ZM10131@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).