#define ARG_INT 0 #define ARG_STRING 1 #define ARG_VAR 2 #define ARG_FUNC 3 #define ARG_UNDEF 4 typedef caddr_t (*Proc)(); typedef struct _Arg { int type; union _data { int i; char *s; struct _Arg *v; struct _procCall { Proc p; struct _Arg *args; } ProcCall; } data; struct _Arg *next; } Arg; typedef struct _FuncMapping { char *name; Proc proc; } FuncMapping; typedef struct _VarMapping { char *name; Arg *arg; } VarMapping; typedef struct _KeyToArg { KeySym keysym; unsigned int modifiers; Arg *arglist; struct _KeyToArg *next; } KeyToArg;