aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-12-06 22:06:26 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-12-06 22:06:26 +0200
commitf2b6d100d8958a9c811c950f113a0ce38a25d484 (patch)
tree53c03280dab7f88134bbcdad1279f13cf12b0cf6 /awk.h
parent0dd8054d05d8286f2f7cbcf85456c6953a9b6146 (diff)
downloadegawk-f2b6d100d8958a9c811c950f113a0ce38a25d484.tar.gz
egawk-f2b6d100d8958a9c811c950f113a0ce38a25d484.tar.bz2
egawk-f2b6d100d8958a9c811c950f113a0ce38a25d484.zip
Add min_required and max_expected arg counts to API.
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/awk.h b/awk.h
index 55746927..4f04fc83 100644
--- a/awk.h
+++ b/awk.h
@@ -778,6 +778,10 @@ typedef struct exp_instruction {
void (*aptr)(void);
struct exp_instruction *xi;
struct break_point *bpt;
+ struct {
+ uint16_t mr; // minimum required
+ uint16_t me; // maximum expected
+ } fa; // function args
} x;
short source_line;
@@ -793,6 +797,9 @@ typedef struct exp_instruction {
#define expr_count x.xl
+#define min_required x.fa.mr
+#define max_expected x.fa.me
+
#define target_continue d.di
#define target_jmp d.di
#define target_break x.xi