zsh-workers
 help / color / mirror / code / Atom feed
* Re: pws-5 seg-fault (old-style) completion
@ 1999-09-21 14:11 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-09-21 14:11 UTC (permalink / raw)
  To: zsh-workers


jarausch@igpm.rwth-aachen.de wrote:

> Hi,
> I've a problem with pws-5 and old style completion (see my zshenv below)
> do e.g.
> ls CI<Tab>
> where there is NO file like CI*, I get a segment fault here on my IRIX
> box.
> My backup version pws-3 doesn't have that problem.

Oh dear... (better not treat strings like pointers to cmatch structs).

Bye
 Sven

--- Src/Zle/zle_tricky.c.old	Tue Sep 21 16:08:54 1999
+++ Src/Zle/zle_tricky.c	Tue Sep 21 16:08:56 1999
@@ -5255,7 +5255,7 @@
 	endcmgroup(NULL);
 
 	if (amatches && !oldlist)
-	    amatches->ccs = (Compctl *) makearray(ccused, 0,
+	    amatches->ccs = (Compctl *) makearray(ccused, 0, 0,
 						  &(amatches->ccount), NULL, NULL);
 	else {
 	    LinkNode n;
@@ -7221,7 +7221,7 @@
 
 /**/
 static Cmatch *
-makearray(LinkList l, int s, int *np, int *nlp, int *llp)
+makearray(LinkList l, int s, int u, int *np, int *nlp, int *llp)
 {
     Cmatch *ap, *bp, *cp, *rp;
     LinkNode nod;
@@ -7272,7 +7272,7 @@
 		nl++;
 	}
 	*cp = NULL;
-    } else {
+    } else if (u) {
 	for (ap = rp; *ap; ap++) {
 	    for (bp = cp = ap + 1; *bp; bp++) {
 		if (!matcheq(*ap, *bp))
@@ -7430,7 +7430,7 @@
 		g->lmatches = g->lfmatches;
 
 	    g->matches = makearray(g->lmatches,
-				   ((g->flags & CGF_NOSORT) ? 0 : 2),
+				   ((g->flags & CGF_NOSORT) ? 0 : 2), 1,
 				   &nn, &nl, &ll);
 	    g->mcount = nn;
 	    if ((g->lcount = nn - nl) < 0)
@@ -7440,7 +7440,7 @@
 		g->lcount = arrlen(g->ylist);
 		smatches = 2;
 	    }
-	    g->expls = (Cexpl *) makearray(g->lexpls, 0, &(g->ecount),
+	    g->expls = (Cexpl *) makearray(g->lexpls, 0, 0, &(g->ecount),
 					   NULL, NULL);
 
 	    g->ccount = 0;
@@ -8822,7 +8822,7 @@
     smatches = 1;
     validlist = 1;
     memset(&dg, 0, sizeof(struct cmgroup));
-    dg.ylist = (char **) makearray(l, 1, &(dg.lcount), NULL, NULL);
+    dg.ylist = (char **) makearray(l, 1, 0, &(dg.lcount), NULL, NULL);
     amatches = &dg;
     ilistmatches(NULL, NULL);
     amatches = am;

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 2+ messages in thread
* pws-5 seg-fault (old-style) completion
@ 1999-09-21 13:57 jarausch
  0 siblings, 0 replies; 2+ messages in thread
From: jarausch @ 1999-09-21 13:57 UTC (permalink / raw)
  To: zsh-workers

Hi,
I've a problem with pws-5 and old style completion (see my zshenv below)
do e.g.
ls CI<Tab>
where there is NO file like CI*, I get a segment fault here on my IRIX
box.
My backup version pws-3 doesn't have that problem.

Thanks for any hints,
Helmut.

from my zshenv
setopt CDABLEVARS CORRECT HIST_IGNORE_SPACE HIST_VERIFY
setopt IGNORE_EOF PATH_DIRS AUTO_MENU ALWAYS_TO_END AUTO_PARAM_KEYS
setopt  COMPLETE_IN_WORD MAGIC_EQUAL_SUBST PUSHD_SILENT EXTENDED_GLOB

-- 
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-09-21 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-21 14:11 pws-5 seg-fault (old-style) completion Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-09-21 13:57 jarausch

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).