* RE: PATCH: tricky.c bug fix(es)
@ 1999-03-09 14:44 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-03-09 14:44 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> > if ((addwhat == CC_FILES ||
> > - addwhat == -5) && !*psuf && !*fsuf) {
> > + addwhat == -5) && !*psuf) {
> > + //---- && !*fsuf) {
>
> Sorry? Is it C? Or C++? In C the ``//'' is invalid; and in C++ the brace is
> lost
That's part my C-style of debugging (gcc can handle that).
Peter: I'm terribly sorry about all this commotion I'm causing today.
Bye
Sven
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Tue Mar 9 15:17:03 1999
+++ Src/Zle/zle_tricky.c Tue Mar 9 15:42:53 1999
@@ -4419,7 +4419,6 @@
if ((addwhat == CC_FILES ||
addwhat == -5) && !*psuf) {
- //---- && !*fsuf) {
/* If this is a filename, do the fignore check. */
char **pt = fignore;
int filell;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH: tricky.c bug fix(es)
@ 1999-03-09 14:19 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-03-09 14:19 UTC (permalink / raw)
To: zsh-workers
With in-word completion and suffixes that caused the code to reduce it
to an empty common suffix this could lead to a SEGV.
And with the matching stuff we have now and in-word completion, we
should do the fignore-test in addmatch() even if there is a suffix.
Bye
Sven
--- os/Zle/zle_tricky.c Tue Mar 9 14:50:32 1999
+++ Src/Zle/zle_tricky.c Tue Mar 9 15:14:25 1999
@@ -2867,7 +2867,7 @@
o->suffix = join_new_sfx(o->suffix, n->wlen, n->word, &miss);
if (miss)
o->flags |= CLF_MISS;
- } else {
+ } else if (o->wlen && n->wlen) {
char so = o->word[o->wlen], sn = n->word[n->wlen];
char *new = o->word;
int newl = o->wlen, mol, mnl;
@@ -2893,7 +2893,8 @@
if (!o->suffix && n->wlen != o->wlen)
o->flags |= CLF_MISS;
- }
+ } else
+ o->wlen = 0;
}
/* Joins two Cline lists, building the most specific line string *
@@ -4417,7 +4418,8 @@
return;
if ((addwhat == CC_FILES ||
- addwhat == -5) && !*psuf && !*fsuf) {
+ addwhat == -5) && !*psuf) {
+ //---- && !*fsuf) {
/* If this is a filename, do the fignore check. */
char **pt = fignore;
int filell;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-03-09 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-09 14:44 PATCH: tricky.c bug fix(es) Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-03-09 14:19 Sven Wischnowsky
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).