-int pat_charfrom(Tcl_Interp *ip, Tcl_Obj *obj, int *val,
- const char *opts, const char *what) {
- *val= enum1_lookup_cached_func(ip,obj,opts,what);
- if (*val==-1) return TCL_ERROR;
- return TCL_OK;
-}
-
-int pat_int(Tcl_Interp *ip, Tcl_Obj *obj, int *val) {
- return Tcl_GetIntFromObj(ip, obj, val);
-}
-
-int pat_long(Tcl_Interp *ip, Tcl_Obj *obj, long *val) {
- return Tcl_GetLongFromObj(ip, obj, val);
-}
-
-int pat_string(Tcl_Interp *ip, Tcl_Obj *obj, const char **val) {
- *val= Tcl_GetString(obj);
- return TCL_OK;
-}
-
-void init_somethingv(Something_Var *sth) {
- sth->obj=0; sth->var=0; sth->copied=0;
-}
-
-int pat_somethingv(Tcl_Interp *ip, Tcl_Obj *var,
- Something_Var *sth, Tcl_ObjType *type) {