* Re: PATCH: 3.1.5-pws-5 + compcall: dynamic fix up
@ 1999-01-28 14:47 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-01-28 14:47 UTC (permalink / raw)
To: zsh-workers
Peter Stephenson wrote:
> The makelistctl() call from compctl.c to handle compcall needs the
> same treatment as other calls between the compctl and zle libraries.
I always forget this. Sorry. Thanks!
> I've also added an incompfunc test, is that correct? It's doubly
> useful because it should also ensure that makecomplistctlptr() has
> been defined by loading zle.
Blink. I remember copying it down together with the function
header. Seems like I accidentally deleted it again. (I.e. yes, this is
not only correct, but also needed.)
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH: 3.1.5-pws-5 + compcall: dynamic fix up
@ 1999-01-28 14:24 Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1999-01-28 14:24 UTC (permalink / raw)
To: Zsh hackers list
The makelistctl() call from compctl.c to handle compcall needs the
same treatment as other calls between the compctl and zle libraries.
I've also added an incompfunc test, is that correct? It's doubly
useful because it should also ensure that makecomplistctlptr() has
been defined by loading zle.
--- Src/Zle/comp1.c.sven3 Thu Jan 28 15:12:03 1999
+++ Src/Zle/comp1.c Thu Jan 28 15:15:15 1999
@@ -66,6 +66,8 @@
/**/
void (*makecomplistcallptr) _((Compctl));
+/**/
+void (*makecomplistctlptr) _((int));
/* Hash table for completion info for commands */
--- Src/Zle/compctl.c.sven3 Thu Jan 28 15:12:04 1999
+++ Src/Zle/compctl.c Thu Jan 28 15:13:06 1999
@@ -1804,8 +1804,12 @@
static int
bin_compcall(char *name, char **argv, char *ops, int func)
{
- makecomplistctl((ops['T'] ? 0 : CFN_FIRST) |
- (ops['D'] ? 0 : CFN_DEFAULT));
+ if (incompfunc != 1) {
+ zerrnam(name, "can only be called from completion function", NULL, 0);
+ return 1;
+ }
+ makecomplistctlptr((ops['T'] ? 0 : CFN_FIRST) |
+ (ops['D'] ? 0 : CFN_DEFAULT));
return 0;
}
--- Src/Zle/zle_main.c.sven3 Thu Jan 28 15:13:36 1999
+++ Src/Zle/zle_main.c Thu Jan 28 15:14:12 1999
@@ -877,6 +877,7 @@
comp_strptr = comp_str;
getcpatptr = getcpat;
makecomplistcallptr = makecomplistcall;
+ makecomplistctlptr = makecomplistctl;
/* initialise the thingies */
init_thingies();
@@ -944,6 +945,7 @@
comp_strptr = NULL;
getcpatptr = NULL;
makecomplistcallptr = NULL;
+ makecomplistctlptr = NULL;
return 0;
}
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-01-28 14:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-28 14:47 PATCH: 3.1.5-pws-5 + compcall: dynamic fix up Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-01-28 14:24 Peter Stephenson
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).