From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id LAA24099 for ; Mon, 20 May 1996 11:27:49 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id VAA20169; Sun, 19 May 1996 21:02:42 -0400 (EDT) Resent-Date: Sun, 19 May 1996 21:02:42 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199605200101.DAA01720@hzoli.ppp.cs.elte.hu> Subject: Re: 8-bit patch for zle_tricky.c To: A.Main@dcs.warwick.ac.uk (Zefram) Date: Mon, 20 May 1996 03:01:06 +0200 (MET DST) In-Reply-To: <29384.199605181151@stone.dcs.warwick.ac.uk> from Zefram at "May 18, 96 12:51:33 pm" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: application/pgp; format=text; x-action=sign Content-Transfer-Encoding: 7bit Resent-Message-ID: <"Fn-RV1.0.0x4.nIydn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1098 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- > The bulk of the patch is actually comment reformatting throughout the > file, to match the style used elsewhere. I rewrote several of the > comments and added more. The patches to utils.c add a niceztrlen(), > and fix a couple of minor bugs. Next time please send this patch in two parts. One with the real changes, and one containing the comment-only changes. This way it is much easier to see the important changes. This 8-bit clean patch introduced a completion bug: when completing ~/foo, the tilte changes to its token. This is fiexed by the patch below. That patch simply removes Zefram's the changes in quotename(). Since a meta character cannot have ispecial type, no special treatment is necessary. Zoltan *** Src/zle_tricky.c 1996/05/19 23:20:45 2.33 --- Src/zle_tricky.c 1996/05/19 23:46:52 *************** *** 1295,1330 **** tt = v = buf; u = s; for (; *u; u++) { - char c = (*u == Meta) ? *++u ^ 32 : *u; - if (e && *e == u) *e = v, sf |= 1; if (te == u) *pl = v - tt, sf |= 2; ! if (ispecial(c) && (!instring || (!isset(NOBANGHIST) && ! c == (char)bangchar) || (instring == 2 && ! (c == '$' || c == '`' || c == '\"')) || ! (instring == 1 && c == '\''))) ! if(c == '\n' || (instring == 1 && c == '\'')) { if (unset(RCQUOTES)) { *v++ = '\''; ! *v++ = '\\'; *v++ = '\''; ! *v++ = '\''; ! } else if (c == '\n') *v++ = '"', *v++ = '\n', *v++ = '"'; else *v++ = '\'', *v++ = '\''; continue; } else *v++ = '\\'; ! if(imeta(c)) { ! *v++ = Meta; ! c ^= 32; ! } ! *v++ = c; } *v = '\0'; if (strcmp(buf, s)) --- 1295,1325 ---- tt = v = buf; u = s; for (; *u; u++) { if (e && *e == u) *e = v, sf |= 1; if (te == u) *pl = v - tt, sf |= 2; ! if (ispecial(*u) && (!instring || (!isset(NOBANGHIST) && ! *u == (char)bangchar) || (instring == 2 && ! (*u == '$' || *u == '`' || *u == '\"')) || ! (instring == 1 && *u == '\''))) ! if (*u == '\n' || (instring == 1 && *u == '\'')) { if (unset(RCQUOTES)) { *v++ = '\''; ! if (*u == '\'') ! *v++ = '\\'; ! *v++ = *u; *v++ = '\''; ! } else if (*u == '\n') *v++ = '"', *v++ = '\n', *v++ = '"'; else *v++ = '\'', *v++ = '\''; continue; } else *v++ = '\\'; ! *v++ = *u; } *v = '\0'; if (strcmp(buf, s)) -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBMZ/ETwupSCiLN749AQG2KwP9E79Oq420O5O6H+0Mt7YM27ZbjX/y8xBl 1Iak5Qxz1gk8wOVb+JLu9Yb+ERb14DvMc+C+9S9bDNp58Q2LeLgl8EtJ2XgnXz8d nN6qGm2dt+vBOAg/AEhwOhNtIS9KnH8wU5rIhbpFYgCGP4ZlccMbApn2jl1srZZR S+Mzf+QFRMQ= =lqji -----END PGP SIGNATURE-----