--- /dev/null
+/*
+ */
+
+#include "tcmdiflib.h"
+
+int pat_enum(Tcl_Interp *ip, Tcl_Obj *obj, const void **val,
+ const void *opts, size_t sz, const char *what) {
+ *val= enum_lookup_cached_func(ip,obj,opts,sz,what);
+ if (!*val) return TCL_ERROR;
+ return TCL_OK;
+}
+
+int pat_obj(Tcl_Interp *ip, Tcl_Obj *obj, Tcl_Obj **val) {
+ *val= obj;
+ return TCL_OK;
+}
+
+Tcl_Obj *ret_int(Tcl_Interp *ip, int val) {
+ return Tcl_NewIntObj(val);
+}
+
+Tcl_Obj *ret_obj(Tcl_Interp *ip, Tcl_Obj *val) {
+ return val;
+}
+
+void setstringresult(Tcl_Interp *ip, const char *m) {
+ Tcl_ResetResult(ip);
+ Tcl_AppendResult(ip, m, (char*)0);
+}