From 20d67907c95265356b51dbdce8ecc0c1ede9e66b Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:11:42 +0000 Subject: zsh-3.1.5-pws-5 --- Src/Zle/comp1.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'Src/Zle/comp1.c') diff --git a/Src/Zle/comp1.c b/Src/Zle/comp1.c index a0c013901..42bc92bb2 100644 --- a/Src/Zle/comp1.c +++ b/Src/Zle/comp1.c @@ -41,7 +41,7 @@ struct compctl cc_compos, cc_default, cc_first, cc_dummy; /**/ Cmlist cmatcher; -/* pointers to functions required by zle */ +/* pointers to functions required by zle and defined by compctl */ /**/ void (*printcompctlptr) _((char *, Compctl, int, int)); @@ -49,6 +49,24 @@ void (*printcompctlptr) _((char *, Compctl, int, int)); /**/ Compctl (*compctl_widgetptr) _((char *, char **)); +/**/ +void (*makecompparamsptr) _((void)); + +/* pointers to functions required by compctl and defined by zle */ + +/**/ +void (*addmatchesptr) _((char *, char *, char *, char *, char *, char *, char *, int, int, int, int, int, char **)); + +/**/ +char *(*comp_strptr) _((int*,int*)); + +/**/ +int (*getcpatptr) _((char *, int, char *, int)); + +/**/ +void (*makecomplistcallptr) _((Compctl)); + + /* Hash table for completion info for commands */ /**/ @@ -72,6 +90,23 @@ char **clwords; /**/ int incompctlfunc; +/* != 0 if we are in a new style completion function */ + +/**/ +int incompfunc; + +/* global variables for shell parameters in new style completion */ + +/**/ +long compcurrent, + compnmatches; + +/**/ +char *compcontext, + *compcommand, + *compprefix, + *compsuffix, + *compiprefix; /* This variable and the functions rembslash() and quotename() came from * * zle_tricky.c, but are now used in compctl.c, too. */ @@ -443,6 +478,8 @@ setup_comp1(Module m) cc_first.refc = 10000; cc_first.mask = 0; cc_first.mask2 = CC_CCCONT; + compcontext = compcommand = compprefix = compsuffix = + compiprefix = NULL; return 0; } @@ -469,6 +506,11 @@ finish_comp1(Module m) deletehashtable(compctltab); zfree(clwords, clwsize * sizeof(char *)); compctlreadptr = fallback_compctlread; + zsfree(compcontext); + zsfree(compcommand); + zsfree(compprefix); + zsfree(compiprefix); + zsfree(compsuffix); return 0; } -- cgit 1.4.1