4 #include "chiark-tcl-base.h"
6 int cht_pat_enum(Tcl_Interp *ip, Tcl_Obj *obj, const void **val,
7 const void *opts, size_t sz, const char *what) {
8 *val= cht_enum_lookup_cached_func(ip,obj,opts,sz,what);
9 if (!*val) return TCL_ERROR;
13 int cht_pat_obj(Tcl_Interp *ip, Tcl_Obj *obj, Tcl_Obj **val) {
18 Tcl_Obj *cht_ret_int(Tcl_Interp *ip, int val) {
19 return Tcl_NewIntObj(val);
22 Tcl_Obj *cht_ret_obj(Tcl_Interp *ip, Tcl_Obj *val) {
26 void cht_setstringresult(Tcl_Interp *ip, const char *m) {
28 Tcl_AppendResult(ip, m, (char*)0);