about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-22 13:04:17 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-22 13:04:17 +0000
commit6f698f634a85d0b3d34b5566d1adb807de577e86 (patch)
tree72a9d25d8c311373ca2129b412f458864e76d68e /Src/zsh.h
parentcf92dbd40be49e48c6ac2039988acdbb1e60251f (diff)
downloadzsh-6f698f634a85d0b3d34b5566d1adb807de577e86.tar.gz
zsh-6f698f634a85d0b3d34b5566d1adb807de577e86.tar.xz
zsh-6f698f634a85d0b3d34b5566d1adb807de577e86.zip
zsh-workers/7976
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 51df16313..651515fc5 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -79,6 +79,30 @@ typedef struct {
 
 typedef int LV;
 
+typedef struct mathfunc *MathFunc;
+typedef mnumber (*NumMathFunc)(char *, int, mnumber *, int);
+typedef mnumber (*StrMathFunc)(char *, char *, int);
+
+struct mathfunc {
+    MathFunc next;
+    char *name;
+    int flags;
+    NumMathFunc nfunc;
+    StrMathFunc sfunc;
+    char *module;
+    int minargs;
+    int maxargs;
+    int funcid;
+};
+
+#define MFF_STR      1
+#define MFF_ADDED    2
+
+#define NUMMATHFUNC(name, func, min, max, id) \
+    { NULL, name, 0, func, NULL, NULL, min, max, id }
+#define STRMATHFUNC(name, func, id) \
+    { NULL, name, MFF_STR, NULL, func, NULL, 0, 0, id }
+
 /* Character tokens are sometimes casted to (unsigned char)'s.         * 
  * Unfortunately, some compilers don't correctly cast signed to        * 
  * unsigned promotions; i.e. (int)(unsigned char)((char) -1) evaluates *