diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-09 09:30:17 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-09 09:30:17 +0200 |
commit | f5e0bbe2d9d1d9594a01fc869392374d1a44afbe (patch) | |
tree | 9900da75c78f9da18a3d74414bc0fbb800d2ba15 /grammar/rainerscript.h | |
parent | f2ef6cd10699ab9f91b9e3e53726512cd290ea68 (diff) | |
download | rsyslog-f5e0bbe2d9d1d9594a01fc869392374d1a44afbe.tar.gz rsyslog-f5e0bbe2d9d1d9594a01fc869392374d1a44afbe.tar.xz rsyslog-f5e0bbe2d9d1d9594a01fc869392374d1a44afbe.zip |
milestone/[PARTWORK]: implemented RainerScript functions
Diffstat (limited to 'grammar/rainerscript.h')
-rw-r--r-- | grammar/rainerscript.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/grammar/rainerscript.h b/grammar/rainerscript.h index b7abf153..5d9eff7f 100644 --- a/grammar/rainerscript.h +++ b/grammar/rainerscript.h @@ -3,6 +3,13 @@ #include <stdio.h> #include <libestr.h> +#define CNFFUNC_MAX_ARGS 32 + /**< maximum number of arguments that any function can have (among + * others, this is used to size data structures). + */ + +extern int Debug; /* 1 if in debug mode, 0 otherwise -- to be enhanced */ + enum cnfobjType { CNFOBJ_ACTION, CNFOBJ_GLOBAL, @@ -125,11 +132,21 @@ struct cnffparamlst { struct cnfexpr *expr; }; +enum cnffuncid { + CNFFUNC_INVALID = 0, /**< defunct entry, do not use (should normally not be present) */ + CNFFUNC_NAME = 1, /**< use name to call function (for future use) */ + CNFFUNC_STRLEN, + CNFFUNC_GETENV, + CNFFUNC_TOLOWER, + CNFFUNC_CSTR, + CNFFUNC_CNUM +}; + struct cnffunc { unsigned nodetype; es_str_t *fname; unsigned short nParams; - unsigned short *fID; /* function ID for built-ins, 0 means use name */ + enum cnffuncid fID; /* function ID for built-ins, 0 means use name */ struct cnfexpr *expr[]; }; |