about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-05-02 15:19:50 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-05-02 15:19:50 +0000
commit53d36e795b26a945048e7a87a1a91224f8e1663a (patch)
treeaee8b11f48f2af1aceacd4a279f1d4b1de6ebfa6 /Src/zsh.h
parent206237c8ec4b7619d9e70a75004cd1ae1066b0a0 (diff)
downloadzsh-53d36e795b26a945048e7a87a1a91224f8e1663a.tar.gz
zsh-53d36e795b26a945048e7a87a1a91224f8e1663a.tar.xz
zsh-53d36e795b26a945048e7a87a1a91224f8e1663a.zip
zsh-3.1.5-pws-17 dot-zsh-199905041932
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index c3c853dfd..1eefc51c1 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -231,6 +231,7 @@ typedef struct hashtable *HashTable;
 typedef struct reswd     *Reswd;
 typedef struct alias     *Alias;
 typedef struct param     *Param;
+typedef struct paramdef  *Paramdef;
 typedef struct cmdnam    *Cmdnam;
 typedef struct shfunc    *Shfunc;
 typedef struct funcwrap  *FuncWrap;
@@ -850,6 +851,7 @@ struct module {
 
 #define MOD_BUSY    (1<<0)
 #define MOD_UNLOAD  (1<<1)
+#define MOD_SETUP   (1<<2)
 
 /* node used in parameter hash table (paramtab) */
 
@@ -923,6 +925,7 @@ struct param {
 #define PM_RESTRICTED	(1<<15) /* cannot be changed in restricted mode       */
 #define PM_UNSET	(1<<16)	/* has null value                             */
 #define PM_REMOVABLE	(1<<17)	/* special can be removed from paramtab */
+#define PM_AUTOLOAD     (1<<18) /* autoloaded from module */
 
 /* Flags for extracting elements of arrays and associative arrays */
 #define SCANPM_WANTVALS   (1<<0)
@@ -955,6 +958,27 @@ struct param {
 #define PF_ASSIGN	0x02	/* argument handled like the RHS of foo=bar */
 #define PF_SINGLE	0x04	/* single word substitution */
 
+struct paramdef {
+    char *name;
+    int flags;
+    void *var;
+    void *set;
+    void *get;
+    void *unset;
+};
+
+#define PARAMDEF(name, flags, var, set, get, unset) \
+    { name, flags, (void *) var, (void *) set, (void *) get, (void *) unset }
+#define INTPARAMDEF(name, var) \
+    { name, PM_INTEGER, (void *) var, (void *) intvarsetfn, \
+      (void *) intvargetfn, (void *) stdunsetfn }
+#define STRPARAMDEF(name, var) \
+    { name, PM_SCALAR, (void *) var, (void *) strvarsetfn, \
+      (void *) strvargetfn, (void *) stdunsetfn }
+#define ARRPARAMDEF(name, var) \
+    { name, PM_ARRAY, (void *) var, (void *) arrvarsetfn, \
+      (void *) arrvargetfn, (void *) stdunsetfn }
+
 /* node for named directory hash table (nameddirtab) */
 
 struct nameddir {