--- rxvt-unicode/src/rxvtperl.h 2011/02/21 07:41:03 1.23 +++ rxvt-unicode/src/rxvtperl.h 2021/11/21 23:00:48 1.30 @@ -38,17 +38,37 @@ void *self; unsigned long grabtime; uint8_t should_invoke[HOOK_NUM]; + + // this object must be zero-initialised + rxvt_perl_term () + { + should_invoke [HOOK_INIT] = + should_invoke [HOOK_DESTROY] = 1; + } }; struct rxvt_perl_interp { char **perl_environ; + #if 0 // see rxvtperl.xs ~rxvt_perl_interp (); + #endif + void init (); void init (rxvt_term *term); - bool invoke (rxvt_term *term, hook_type htype, ...); + void eval (const char *str); + bool invoke (rxvt_term *term, int htype, ...); void line_update (rxvt_term *term); + void selection_finish (rxvt_selection *sel, char *data, unsigned int len); + void usage (rxvt_term *term, int type); + + enum + { + RESOURCE_AVAILABLE = 1, // whether the option is valid + RESOURCE_ARG = 2 // whether the option eats the next arg + }; + uint8_t parse_resource (rxvt_term *term, const char *name, bool arg, bool longopt, bool flag, const char *value); }; extern struct rxvt_perl_interp rxvt_perl;