about summary refs log tree commit diff
path: root/Src/Zle/comp1.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:11:42 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:11:42 +0000
commit20d67907c95265356b51dbdce8ecc0c1ede9e66b (patch)
tree69b0777db02f96555b3a0587cd630025062a7f09 /Src/Zle/comp1.c
parent2a5a899a55fd2bce10efd01c75a4bec5285aa46c (diff)
downloadzsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.tar.gz
zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.tar.xz
zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.zip
zsh-3.1.5-pws-5 zsh-3.1.5-pws-5
Diffstat (limited to 'Src/Zle/comp1.c')
-rw-r--r--Src/Zle/comp1.c44
1 files changed, 43 insertions, 1 deletions
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;
 }