From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Glob qualifier close parenthesis tidy up
Date: Thu, 19 Mar 1998 15:32:48 +0100 [thread overview]
Message-ID: <199803191432.PAA16308@hydra.ifh.de> (raw)
This fixes
% print foo(:g/o/a)
fa?o
^ 8-bit squiggle
which is actually two bugs: first, the `)' was included; second, the
tokens in the expression weren't removed.
Without my kshglob patch you will have to apply some of this by hand,
which shouldn't be a major cause of woe in this case.
*** Src/glob.c.cpar Fri Feb 6 11:23:02 1998
--- Src/glob.c Thu Mar 19 15:21:24 1998
***************
*** 864,869 ****
--- 864,871 ----
}
if (*str == ':' && str[-1] == Inpar) {
str[-1] = '\0';
+ str[strlen(str)-1] = '\0';
+ untokenize(str);
modify((char **) &getdata(np), &str);
return;
}
***************
*** 896,905 ****
break;
if (*s == Inpar && (!isset(KSHGLOB) || (s > str && s[-1] == '-'))) {
/* Real qualifiers found. */
if (isset(KSHGLOB))
s[-1] = '\0';
*s++ = '\0';
! while (*s != Outpar && !colonmod) {
func = (int (*) _((Statptr, long)))0;
if (idigit(*s)) {
/* Store numeric argument for qualifier */
--- 898,908 ----
break;
if (*s == Inpar && (!isset(KSHGLOB) || (s > str && s[-1] == '-'))) {
/* Real qualifiers found. */
+ str[sl-1] = '\0';
if (isset(KSHGLOB))
s[-1] = '\0';
*s++ = '\0';
! while (*s && !colonmod) {
func = (int (*) _((Statptr, long)))0;
if (idigit(*s)) {
/* Store numeric argument for qualifier */
***************
*** 925,930 ****
--- 928,934 ----
/* Remaining arguments are history-type *
* colon substitutions, handled separately. */
colonmod = s - 1;
+ untokenize(colonmod);
break;
case Hat:
case '^':
***************
*** 1086,1092 ****
zerr("unknown user", NULL, 0);
data = 0;
}
! if ((*tt = sav) != Outpar)
s = tt + 1;
else
s = tt;
--- 1090,1096 ----
zerr("unknown user", NULL, 0);
data = 0;
}
! if ((*tt = sav))
s = tt + 1;
else
s = tt;
***************
*** 1119,1125 ****
zerr("unknown group", NULL, 0);
data = 0;
}
! if ((*tt = sav) != Outpar)
s = tt + 1;
else
s = tt;
--- 1123,1129 ----
zerr("unknown group", NULL, 0);
data = 0;
}
! if ((*tt = sav))
s = tt + 1;
else
s = tt;
--
Peter Stephenson <pws@ifh.de> Tel: +39 50 844536
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
next reply other threads:[~1998-03-19 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-03-19 14:32 Peter Stephenson [this message]
1998-03-19 17:06 ` PATCH: 3.0.5 " Bart Schaefer
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=199803191432.PAA16308@hydra.ifh.de \
--to=pws@ifh.de \
--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).