Index: TODO =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- TODO (.../TODO) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ TODO (.../TODO) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -1293,7 +1293,12 @@ - changed XOTclpGetClass into GetClassFromString - changed callDestroyMethod into DispatchDestroyMethod +- BRO continues: + - overworked function prototype definitions in nsf.c + - renamed some static definitions on the way to follow + Tcl conventions (start with a capital character) + TODO: - check equivalence of the following two commands Index: generic/gentclAPI.decls =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -15,7 +15,7 @@ } # -# XOTcl commands +# Next Scripting commands # nsfCmd alias NsfAliasCmd { {-argName "object" -type object} Index: generic/gentclAPI.tcl =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -25,7 +25,7 @@ set enums [list ${name}NULL] foreach d $domain {lappend enums $name[string totitle [string map [list - _] $d]]Idx} subst { -static int convertTo${name}(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertTo${name}(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; $opts @@ -70,7 +70,7 @@ # } else { # set default "" # } - lappend l "{\"$argName\", $(-required), $(-nrargs), convertTo$converter}" + lappend l "{\"$argName\", $(-required), $(-nrargs), ConvertTo$converter}" } join $l ",\n " } @@ -153,7 +153,7 @@ lappend if "CONST char *${varName}String" "NsfObject *${varName}Obj" set ifSet 1 append pre [subst -nocommands { - if (getMatchObject(interp, ${varName}, objc>$i ? objv[$i] : NULL, &${varName}Obj, &${varName}String) == -1) { + if (GetMatchObject(interp, ${varName}, objc>$i ? objv[$i] : NULL, &${varName}Obj, &${varName}String) == -1) { if (${varName}) { DECR_REF_COUNT(${varName}); } @@ -193,7 +193,7 @@ return [subst -nocommands { static int ${stub}(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; $intro if (ArgumentParse(interp, objc, objv, $obj, objv[0], method_definitions[$idx].paramDefs, @@ -203,7 +203,7 @@ } else { $cDefs $pre - parseContextRelease(&pc); + ParseContextRelease(&pc); $call $post } @@ -286,9 +286,9 @@ static int ArgumentParse(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], NsfObject *obj, Tcl_Obj *procName, NsfParam CONST *paramPtr, int nrParameters, int doCheck, - parseContext *pc); + ParseContext *pc); -static int getMatchObject(Tcl_Interp *interp, Tcl_Obj *patternObj, Tcl_Obj *origObj, +static int GetMatchObject(Tcl_Interp *interp, Tcl_Obj *patternObj, Tcl_Obj *origObj, NsfObject **matchObject, CONST char **pattern); /* just to define the symbol */ @@ -309,7 +309,7 @@ puts "enum {\n $enumString\n} NsfMethods;\n" puts $fns set definitionString [join $ifds ",\n"] -puts "static methodDefinition method_definitions\[\] = \{\n$definitionString,\{NULL\}\n\};\n" + puts "static methodDefinition method_definitions\[\] = \{\n$definitionString,\{NULL\}\n\};\n" } proc methodDefinition {methodName methodType implementation parameterDefinitions {ns ""}} { Index: generic/nsf.c =================================================================== diff -u -rcb7e3a02c1964d38d85c7e129027fc1b3225d3e6 -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/nsf.c (.../nsf.c) (revision cb7e3a02c1964d38d85c7e129027fc1b3225d3e6) +++ generic/nsf.c (.../nsf.c) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -59,9 +59,9 @@ #ifdef USE_TCL_STUBS # define Nsf_ExprObjCmd(clientData, interp, objc, objv) \ - NsfCallCommand(interp, XOTE_EXPR, objc, objv) + NsfCallCommand(interp, NSF_EXPR, objc, objv) # define Nsf_SubstObjCmd(clientData, interp, objc, objv) \ - NsfCallCommand(interp, XOTE_SUBST, objc, objv) + NsfCallCommand(interp, NSF_SUBST, objc, objv) #else # define Nsf_ExprObjCmd(clientData, interp, objc, objv) \ Tcl_ExprObjCmd(clientData, interp, objc, objv) @@ -148,9 +148,9 @@ int mustDecr; int varArgs; NsfObject *object; -} parseContext; +} ParseContext; -static NsfTypeConverter convertToNothing; +static NsfTypeConverter ConvertToNothing; /* * Tcl_Obj Types for Next Scripting Objects @@ -202,7 +202,7 @@ static Tcl_Obj *NameInNamespaceObj(Tcl_Interp *interp, CONST char *name, Tcl_Namespace *ns); static Tcl_Namespace *CallingNameSpace(Tcl_Interp *interp); NSF_INLINE static Tcl_Command NSFindCommand(Tcl_Interp *interp, CONST char *name, Tcl_Namespace *ns); -static Tcl_Namespace*NSGetFreshNamespace(Tcl_Interp *interp, ClientData clientData, CONST char *name, int create); +static Tcl_Namespace *NSGetFreshNamespace(Tcl_Interp *interp, ClientData clientData, CONST char *name, int create); /* prototypes for filters and mixins */ static void FilterComputeDefined(Tcl_Interp *interp, NsfObject *object); @@ -226,14 +226,15 @@ /* prototypes for parameter and argument management */ static int NsfInvalidateObjectParameterCmd(Tcl_Interp *interp, NsfClass *cl); -static int ProcessMethodArguments(parseContext *pcPtr, Tcl_Interp *interp, +static int ProcessMethodArguments(ParseContext *pcPtr, Tcl_Interp *interp, NsfObject *object, int pushFrame, NsfParamDefs *paramDefs, CONST char *methodName, int objc, Tcl_Obj *CONST objv[]); static int ArgumentCheck(Tcl_Interp *interp, Tcl_Obj *objPtr, struct NsfParam CONST *pPtr, int doCheck, int *flags, ClientData *clientData, Tcl_Obj **outObjPtr); static int ParameterCheck(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *valueObj, const char *varNamePrefix, int doCheck, NsfParam **paramPtrPtr); static void ParamDefsFree(NsfParamDefs *paramDefs); +static int ParamSetFromAny(Tcl_Interp *interp, register Tcl_Obj *objPtr); /* prototypes for alias management */ static int AliasDelete(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object); @@ -245,15 +246,14 @@ /* - * argv parseing + * argv parsing */ - static void -parseContextInit(parseContext *pcPtr, int objc, NsfObject *object, Tcl_Obj *procName) { +ParseContextInit(ParseContext *pcPtr, int objc, NsfObject *object, Tcl_Obj *procName) { if (objc < PARSE_CONTEXT_PREALLOC) { /* the single larger memset below .... */ - memset(pcPtr, 0, sizeof(parseContext)); + memset(pcPtr, 0, sizeof(ParseContext)); /* ... is faster than the two smaller memsets below */ /* memset(pcPtr->clientData_static, 0, sizeof(ClientData)*(objc)); memset(pcPtr->objv_static, 0, sizeof(Tcl_Obj*)*(objc+1));*/ @@ -276,7 +276,8 @@ pcPtr->mustDecr = 0; } -static void parseContextExtendObjv(parseContext *pcPtr, int from, int elts, Tcl_Obj *CONST source[]) { +static void +ParseContextExtendObjv(ParseContext *pcPtr, int from, int elts, Tcl_Obj *CONST source[]) { int requiredSize = from + elts + 1; /*NsfPrintObjv("BEFORE: ", pcPtr->objc, pcPtr->full_objv);*/ @@ -301,7 +302,8 @@ /*NsfPrintObjv("AFTER: ", pcPtr->objc, pcPtr->full_objv);*/ } -static void parseContextRelease(parseContext *pcPtr) { +static void +ParseContextRelease(ParseContext *pcPtr) { if (pcPtr->mustDecr) { int i; for (i = 0; i < pcPtr->lastobjc; i++) { @@ -313,7 +315,7 @@ /* objv can be separately extended */ if (pcPtr->objv != &pcPtr->objv_static[1]) { - /*fprintf(stderr, "parseContextRelease %p free %p %p\n", pcPtr, pcPtr->full_objv, pcPtr->clientData);*/ + /*fprintf(stderr, "ParseContextRelease %p free %p %p\n", pcPtr, pcPtr->full_objv, pcPtr->clientData);*/ ckfree((char *)pcPtr->full_objv); } /* if the parameter definition was extended, both clientData and flags are extended */ @@ -370,18 +372,11 @@ return varTablePtr; } -#if 0 -static int duringBootstrap(Tcl_Interp *interp) { - Tcl_Obj *bootstrap = Tcl_GetVar2Ex(interp, "::nsf::bootstrap", NULL, TCL_GLOBAL_ONLY); - return (bootstrap != NULL); -} -#endif - /* * call an Next Scripting method */ static int -callMethod(ClientData clientData, Tcl_Interp *interp, Tcl_Obj *methodObj, +CallMethod(ClientData clientData, Tcl_Interp *interp, Tcl_Obj *methodObj, int objc, Tcl_Obj *CONST objv[], int flags) { NsfObject *object = (NsfObject*) clientData; int result; @@ -394,7 +389,7 @@ if (objc>2) memcpy(tov+2, objv, sizeof(Tcl_Obj *)*(objc-2)); - /*fprintf(stderr, "%%%% callMethod cmdname=%s, method=%s, objc=%d\n", + /*fprintf(stderr, "%%%% CallMethod cmdname=%s, method=%s, objc=%d\n", ObjStr(tov[0]), ObjStr(tov[1]), objc); {int i; fprintf(stderr, "\t CALL: %s ", ObjStr(methodObj));for(i=0; i3) memcpy(tov+3, objv, sizeof(Tcl_Obj *)*(objc-3)); - /*fprintf(stderr, "%%%% callMethodWithArg cmdname=%s, method=%s, objc=%d\n", + /*fprintf(stderr, "%%%% CallMethodWithArg cmdname=%s, method=%s, objc=%d\n", ObjStr(tov[0]), ObjStr(tov[1]), objc);*/ result = ObjectDispatch(clientData, interp, objc, tov, flags); @@ -439,7 +434,8 @@ } #ifdef DISPATCH_TRACE -static void printObjv(int objc, Tcl_Obj *CONST objv[]) { +static void +PrintObjv(int objc, Tcl_Obj *CONST objv[]) { int i, j; fprintf(stderr, "(%d)", objc); if (objc <= 3) j = objc; else j = 3; @@ -448,15 +444,17 @@ fprintf(stderr, " (objc=%d)", objc); } -static void printCall(Tcl_Interp *interp, CONST char *string, int objc, Tcl_Obj *CONST objv[]) { +static void +PrintCall(Tcl_Interp *interp, CONST char *string, int objc, Tcl_Obj *CONST objv[]) { fprintf(stderr, " (%d) >%s: ", Tcl_Interp_numLevels(interp), string); - printObjv(objc, objv); + PrintObjv(objc, objv); fprintf(stderr, "\n"); } -static void printExit(Tcl_Interp *interp, CONST char *string, +static void +PrintExit(Tcl_Interp *interp, CONST char *string, int objc, Tcl_Obj *CONST objv[], int result) { fprintf(stderr, " (%d) <%s: ", Tcl_Interp_numLevels(interp), string); - /*printObjv(objc, objv);*/ + /*PrintObjv(objc, objv);*/ fprintf(stderr, " result=%d '%s'\n", result, ObjStr(Tcl_GetObjResult(interp))); } #endif @@ -484,7 +482,8 @@ #endif #if defined(NSFOBJ_TRACE) -void objTrace(char *string, NsfObject *object) { +void +ObjTrace(char *string, NsfObject *object) { if (object) fprintf(stderr, "--- %s tcl %p %s (%d %p) nsf %p (%d) %s \n", string, object->cmdName, object->cmdName->typePtr ? object->cmdName->typePtr->name : "NULL", @@ -494,7 +493,7 @@ fprintf(stderr, "--- No object: %s\n", string); } #else -# define objTrace(a, b) +# define ObjTrace(a, b) #endif @@ -510,7 +509,7 @@ } NSF_INLINE static int -isClassName(CONST char *string) { +IsClassName(CONST char *string) { return (strncmp((string), "::nsf::classes", 14) == 0); } @@ -527,7 +526,7 @@ * Get object or class from a fully qualified cmd name, such as * e.g. ::nsf::classes::X */ - if (isClassName(string)) { + if (IsClassName(string)) { *fromClassNS = 1; return (NsfObject *)GetClassFromString(interp, NSCutNsfClasses(string)); } else { @@ -714,12 +713,12 @@ INCR_REF_COUNT(nameObj); - methodObj = NsfMethodObj(interp, &baseClass->object, XO_c_requireobject_idx); + methodObj = NsfMethodObj(interp, &baseClass->object, NSF_c_requireobject_idx); if (methodObj) { /*fprintf(stderr, "+++ calling __unknown for %s name=%s\n", className(baseClass), ObjStr(nameObj));*/ - result = callMethod((ClientData) baseClass, interp, methodObj, + result = CallMethod((ClientData) baseClass, interp, methodObj, 3, &nameObj, NSF_CM_NO_PROTECT); if (result == TCL_OK) { result = GetClassFromObj(interp, objPtr, cl, NULL); @@ -764,7 +763,7 @@ } /* reverse class list, caller is responsible for freeing data */ -static NsfClasses* +static NsfClasses * NsfReverseClasses(NsfClasses *sl) { NsfClasses *firstPtr = NULL; for (; sl; sl = sl->nextPtr) { @@ -777,7 +776,7 @@ return firstPtr; } -extern NsfClasses** +extern NsfClasses ** NsfClassListAdd(NsfClasses **cList, NsfClass *cl, ClientData clientData) { NsfClasses *l = *cList, *element = NEW(NsfClasses); element->cl = cl; @@ -822,9 +821,11 @@ enum colors { WHITE, GRAY, BLACK }; -static NsfClasses *Super(NsfClass *cl) { return cl->super; } -static NsfClasses *Sub(NsfClass *cl) { return cl->sub; } +static NsfClasses * +Super(NsfClass *cl) { return cl->super; } +static NsfClasses * +Sub(NsfClass *cl) { return cl->sub; } static int TopoSort(NsfClass *cl, NsfClass *baseClass, NsfClasses *(*next)(NsfClass*)) { @@ -863,27 +864,27 @@ return 1; } -static NsfClasses* +static NsfClasses * TopoOrder(NsfClass *cl, NsfClasses *(*next)(NsfClass*)) { if (TopoSort(cl, cl, next)) return cl->order; NsfClassListFree(cl->order); return cl->order = NULL; } -static NsfClasses* +static NsfClasses * ComputeOrder(NsfClass *cl, NsfClasses *order, NsfClasses *(*direction)(NsfClass*)) { if (order) return order; return cl->order = TopoOrder(cl, direction); } -extern NsfClasses* +extern NsfClasses * NsfComputePrecedence(NsfClass *cl) { return ComputeOrder(cl, cl->order, Super); } -extern NsfClasses* +extern NsfClasses * NsfComputeDependents(NsfClass *cl) { return ComputeOrder(cl, cl->order, Sub); } @@ -992,22 +993,24 @@ * internal type checking */ -extern Nsf_Class* +extern Nsf_Class * NsfIsClass(Tcl_Interp *interp, ClientData clientData) { if (clientData && NsfObjectIsClass((NsfObject *)clientData)) - return (Nsf_Class*) clientData; + return (Nsf_Class *) clientData; return 0; } /* * methods lookup */ -static int CmdIsProc(Tcl_Command cmd) { +static int +CmdIsProc(Tcl_Command cmd) { /* In 8.6: TclIsProc((Command*)cmd) is not equiv to the definition below */ return (Tcl_Command_objProc(cmd) == TclObjInterpProc); } -static Proc *GetTclProcFromCommand(Tcl_Command cmd) { +static Proc * +GetTclProcFromCommand(Tcl_Command cmd) { if (cmd) { Tcl_ObjCmdProc *proc = Tcl_Command_objProc(cmd); if (proc == TclObjInterpProc) @@ -1031,7 +1034,7 @@ return GetTclProcFromCommand(FindMethod(nsPtr, methodName)); } -static NsfClass* +static NsfClass * SearchPLMethod(register NsfClasses *pl, CONST char *methodName, Tcl_Command *cmd) { /* Search the precedence list (class hierarchy) */ #if 1 @@ -1053,7 +1056,7 @@ } -static NsfClass* +static NsfClass * SearchCMethod(/*@notnull@*/ NsfClass *cl, CONST char *nm, Tcl_Command *cmd) { assert(cl); return SearchPLMethod(ComputeOrder(cl, cl->order, Super), nm, cmd); @@ -1108,11 +1111,11 @@ *---------------------------------------------------------------------- */ -static void +static void ObjectSystemFree(Tcl_Interp *interp, NsfObjectSystem *osPtr) { int i; - for (i=0; i<=XO_o_unknown_idx; i++) { + for (i=0; i<=NSF_o_unknown_idx; i++) { Tcl_Obj *methodObj = osPtr->methods[i]; /*fprintf(stderr, "ObjectSystemFree [%d] %p ", i, methodObj);*/ if (methodObj) { @@ -1148,7 +1151,7 @@ * *---------------------------------------------------------------------- */ -static void +static void ObjectSystemAdd(Tcl_Interp *interp, NsfObjectSystem *osPtr) { osPtr->nextPtr = RUNTIME_STATE(interp)->objectSystems; RUNTIME_STATE(interp)->objectSystems = osPtr; @@ -1176,7 +1179,7 @@ int i; for (osPtr = RUNTIME_STATE(interp)->objectSystems; osPtr; osPtr = osPtr->nextPtr) { - for (i=0; i<=XO_o_unknown_idx; i++) { + for (i=0; i<=NSF_o_unknown_idx; i++) { Tcl_Obj *methodObj = osPtr->methods[i]; if (methodObj && !strcmp(methodName, ObjStr(methodObj))) { int flag = 1<opt; } -extern NsfClassOpt* +extern NsfClassOpt * NsfRequireClassOpt(/*@notnull@*/ NsfClass *cl) { assert(cl); if (!cl->opt) { @@ -1737,7 +1742,8 @@ * *---------------------------------------------------------------------- */ -void CompiledColonVarFree(Tcl_ResolvedVarInfo *vinfoPtr) { +void +CompiledColonVarFree(Tcl_ResolvedVarInfo *vinfoPtr) { nsfResolvedVarInfo *resVarInfo = (nsfResolvedVarInfo *)vinfoPtr; DECR_REF_COUNT(resVarInfo->nameObj); if (resVarInfo->var) {HashVarFree(resVarInfo->var);} @@ -1758,7 +1764,8 @@ * *---------------------------------------------------------------------- */ -int InterpCompiledColonVarResolver(Tcl_Interp *interp, +static int +InterpCompiledColonVarResolver(Tcl_Interp *interp, CONST84 char *name, int length, Tcl_Namespace *context, Tcl_ResolvedVarInfo **rPtr) { /* @@ -1966,7 +1973,7 @@ *********************************************************/ static Tcl_Namespace * -requireObjNamespace(Tcl_Interp *interp, NsfObject *object) { +RequireObjNamespace(Tcl_Interp *interp, NsfObject *object) { if (!object->nsPtr) { MakeObjNamespace(interp, object); @@ -1983,7 +1990,7 @@ extern void NsfRequireObjNamespace(Tcl_Interp *interp, Nsf_Object *object) { - requireObjNamespace(interp, (NsfObject*) object); + RequireObjNamespace(interp, (NsfObject*) object); } @@ -2230,10 +2237,10 @@ NsfObject *parentObj = (NsfObject*) GetObjectFromString(interp, parentName); if (parentObj) { /* this is for classes */ - requireObjNamespace(interp, parentObj); + RequireObjNamespace(interp, parentObj); } else { NsfClass *defaultSuperClass = DefaultSuperClass(interp, cl, cl->object.cl, 0); - Tcl_Obj *methodObj = NsfMethodObj(interp, &defaultSuperClass->object, XO_c_requireobject_idx); + Tcl_Obj *methodObj = NsfMethodObj(interp, &defaultSuperClass->object, NSF_c_requireobject_idx); if (methodObj) { /* call requireObject and try again */ @@ -2249,7 +2256,7 @@ if (result == TCL_OK) { NsfObject *parentObj = (NsfObject*) GetObjectFromString(interp, parentName); if (parentObj) { - requireObjNamespace(interp, parentObj); + RequireObjNamespace(interp, parentObj); } rc = (Tcl_FindNamespace(interp, parentName, (Tcl_Namespace *) NULL, TCL_GLOBAL_ONLY) != NULL); @@ -2262,7 +2269,7 @@ } else { NsfObject *parentObj = (NsfObject*) GetObjectFromString(interp, parentName); if (parentObj) { - requireObjNamespace(interp, parentObj); + RequireObjNamespace(interp, parentObj); } } DSTRING_FREE(dsp); @@ -2301,7 +2308,7 @@ /* * Find an object using a char *name */ -static NsfObject* +static NsfObject * GetObjectFromString(Tcl_Interp *interp, CONST char *name) { register Tcl_Command cmd; assert(name); @@ -2325,12 +2332,12 @@ * Find a class using a char *name */ -extern Nsf_Class* +extern Nsf_Class * NsfGetClass(Tcl_Interp *interp, CONST char *name) { - return (Nsf_Class*)GetClassFromString(interp, name); + return (Nsf_Class *)GetClassFromString(interp, name); } -static NsfClass* +static NsfClass * GetClassFromString(Tcl_Interp *interp, CONST char *name) { NsfObject *object = GetObjectFromString(interp, name); return (object && NsfObjectIsClass(object)) ? (NsfClass*)object : NULL; @@ -2360,7 +2367,7 @@ int flags) { NsfObject *object = (NsfObject *)object1; Tcl_DString newCmdName, *dsPtr = &newCmdName; - Tcl_Namespace *ns = requireObjNamespace(interp, object); + Tcl_Namespace *ns = RequireObjNamespace(interp, object); Tcl_Command newCmd; int result; @@ -2453,7 +2460,7 @@ if (object->nsPtr) flgs |= TCL_NAMESPACE_ONLY; - valueObj = Tcl_ObjGetVar2(interp, NsfGlobalObjs[XOTE_AUTONAMES], nameObj, flgs); + valueObj = Tcl_ObjGetVar2(interp, NsfGlobalObjs[NSF_AUTONAMES], nameObj, flgs); if (valueObj) { long autoname_counter; /* should probably do an overflow check here */ @@ -2464,19 +2471,19 @@ } Tcl_SetLongObj(valueObj, autoname_counter); } - Tcl_ObjSetVar2(interp, NsfGlobalObjs[XOTE_AUTONAMES], nameObj, + Tcl_ObjSetVar2(interp, NsfGlobalObjs[NSF_AUTONAMES], nameObj, valueObj, flgs); if (resetOpt) { if (valueObj) { /* we have an entry */ - Tcl_UnsetVar2(interp, NsfGlobalStrings[XOTE_AUTONAMES], ObjStr(nameObj), flgs); + Tcl_UnsetVar2(interp, NsfGlobalStrings[NSF_AUTONAMES], ObjStr(nameObj), flgs); } - result = NsfGlobalObjs[XOTE_EMPTY]; + result = NsfGlobalObjs[NSF_EMPTY]; INCR_REF_COUNT(result); } else { if (valueObj == NULL) { - valueObj = Tcl_ObjSetVar2(interp, NsfGlobalObjs[XOTE_AUTONAMES], - nameObj, NsfGlobalObjs[XOTE_ONE], flgs); + valueObj = Tcl_ObjSetVar2(interp, NsfGlobalObjs[NSF_AUTONAMES], + nameObj, NsfGlobalObjs[NSF_ONE], flgs); } if (instanceOpt) { char buffer[1], firstChar; @@ -2520,7 +2527,7 @@ INCR_REF_COUNT(savedResult); ov[1] = result; ov[2] = valueObj; - if (NsfCallCommand(interp, XOTE_FORMAT, 3, ov) != TCL_OK) { + if (NsfCallCommand(interp, NSF_FORMAT, 3, ov) != TCL_OK) { Nsf_PopFrameObj(interp, framePtr); DECR_REF_COUNT(savedResult); FREE_ON_STACK(Tcl_Obj*, ov); @@ -2654,7 +2661,7 @@ /* * Cmd List Add/Remove ... returns the new element */ -static NsfCmdList* +static NsfCmdList * CmdListAdd(NsfCmdList **cList, Tcl_Command c, NsfClass *clorobj, int noDuplicates) { NsfCmdList *l = *cList, *new; @@ -2742,7 +2749,7 @@ * remove a command 'delCL' from a command list, but do not * free it ... returns the removed NsfCmdList* */ -static NsfCmdList* +static NsfCmdList * CmdListRemoveFromList(NsfCmdList **cmdList, NsfCmdList *delCL) { register NsfCmdList *c = *cmdList, *del = NULL; if (c == NULL) @@ -2829,7 +2836,7 @@ * simple list search proc to search a list of cmds * for a command ptr */ -static NsfCmdList* +static NsfCmdList * CmdListFindCmdInList(Tcl_Command cmd, NsfCmdList *l) { register NsfCmdList *h; for (h = l; h; h = h->nextPtr) { @@ -2843,7 +2850,7 @@ * simple list search proc to search a list of cmds * for a simple Name */ -static NsfCmdList* +static NsfCmdList * CmdListFindNameInList(Tcl_Interp *interp, CONST char *name, NsfCmdList *l) { register NsfCmdList *h; for (h = l; h; h = h->nextPtr) { @@ -2857,7 +2864,7 @@ /* * Assertions */ -static NsfTclObjList* +static NsfTclObjList * AssertionNewList(Tcl_Interp *interp, Tcl_Obj *aObj) { Tcl_Obj **ov; int oc; NsfTclObjList *last = NULL; @@ -2915,13 +2922,13 @@ return TCL_OK; } -static NsfProcAssertion* +static NsfProcAssertion * AssertionFindProcs(NsfAssertionStore *aStore, CONST char *name) { Tcl_HashEntry *hPtr; if (aStore == NULL) return NULL; hPtr = Tcl_CreateHashEntry(&aStore->procs, name, NULL); if (hPtr == NULL) return NULL; - return (NsfProcAssertion*) Tcl_GetHashValue(hPtr); + return (NsfProcAssertion *) Tcl_GetHashValue(hPtr); } static void @@ -2931,7 +2938,7 @@ hPtr = Tcl_CreateHashEntry(&aStore->procs, name, NULL); if (hPtr) { NsfProcAssertion *procAss = - (NsfProcAssertion*) Tcl_GetHashValue(hPtr); + (NsfProcAssertion *) Tcl_GetHashValue(hPtr); TclObjListFreeList(procAss->pre); TclObjListFreeList(procAss->post); FREE(NsfProcAssertion, procAss); @@ -2954,7 +2961,7 @@ if (nw) Tcl_SetHashValue(hPtr, (ClientData)procs); } -static NsfAssertionStore* +static NsfAssertionStore * AssertionCreateStore() { NsfAssertionStore *aStore = NEW(NsfAssertionStore); aStore->invariants = NULL; @@ -2989,7 +2996,7 @@ * it's the responsiblity of the caller to push the intended callframe */ static int -checkConditionInScope(Tcl_Interp *interp, Tcl_Obj *condition) { +CheckConditionInScope(Tcl_Interp *interp, Tcl_Obj *condition) { int result, success; Tcl_Obj *ov[2] = {NULL, condition}; @@ -3023,7 +3030,7 @@ we can not react in catch on a runtime assertion check failure */ #if 1 - /* TODO: the following check operations is nsf1 legacy and is not + /* TODO: the following check operations is XOTcl1 legacy and is not generic. it should be replaced by another methodproperty. Most of the is*String() definition are then obsolete and should be deleted from @@ -3064,7 +3071,7 @@ /* * now check the assertion in the pushed callframe's scope */ - acResult = checkConditionInScope(interp, alist->content); + acResult = CheckConditionInScope(interp, alist->content); if (acResult != TCL_OK) checkFailed = alist; @@ -3155,7 +3162,8 @@ return result; } -static int AssertionSetCheckOptions(Tcl_Interp *interp, NsfObject *object, Tcl_Obj *arg) { +static int +AssertionSetCheckOptions(Tcl_Interp *interp, NsfObject *object, Tcl_Obj *arg) { NsfObjectOpt *opt = NsfRequireObjectOpt(object); int ocArgs, i; Tcl_Obj **ovArgs; @@ -3202,7 +3210,8 @@ return TCL_OK; } -static void AssertionSetInvariants(Tcl_Interp *interp, NsfAssertionStore **assertions, Tcl_Obj *arg) { +static void +AssertionSetInvariants(Tcl_Interp *interp, NsfAssertionStore **assertions, Tcl_Obj *arg) { if (*assertions) TclObjListFreeList((*assertions)->invariants); else @@ -3393,7 +3402,7 @@ NsfCmdList *new; if (Tcl_ListObjGetElements(interp, nameObj, &ocName, &ovName) == TCL_OK && ocName > 1) { - if (ocName == 3 && !strcmp(ObjStr(ovName[1]), NsfGlobalStrings[XOTE_GUARD_OPTION])) { + if (ocName == 3 && !strcmp(ObjStr(ovName[1]), NsfGlobalStrings[NSF_GUARD_OPTION])) { nameObj = ovName[0]; guardObj = ovName[2]; /*fprintf(stderr, "mixinadd name = '%s', guard = '%s'\n", ObjStr(name), ObjStr(guard));*/ @@ -3501,12 +3510,12 @@ } /* - * helper function for getAllClassMixinsOf to add classes to the + * helper function for GetAllClassMixinsOf to add classes to the * result set, flagging test for matchObject as result */ static int -addToResultSet(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfObject *object, int *new, +AddToResultSet(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfObject *object, int *new, int appendResult, CONST char *pattern, NsfObject *matchObject) { Tcl_CreateHashEntry(destTable, (char *)object, new); if (*new) { @@ -3521,12 +3530,12 @@ } /* - * helper function for getAllClassMixins to add classes with guards + * helper function for GetAllClassMixins to add classes with guards * to the result set, flagging test for matchObject as result */ static int -addToResultSetWithGuards(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfClass *cl, ClientData clientData, int *new, +AddToResultSetWithGuards(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfClass *cl, ClientData clientData, int *new, int appendResult, CONST char *pattern, NsfObject *matchObject) { Tcl_CreateHashEntry(destTable, (char *)cl, new); if (*new) { @@ -3535,7 +3544,7 @@ Tcl_Obj *l = Tcl_NewListObj(0, NULL); Tcl_Obj *g = (Tcl_Obj*) clientData; Tcl_ListObjAppendElement(interp, l, cl->object.cmdName); - Tcl_ListObjAppendElement(interp, l, NsfGlobalObjs[XOTE_GUARD_OPTION]); + Tcl_ListObjAppendElement(interp, l, NsfGlobalObjs[NSF_GUARD_OPTION]); Tcl_ListObjAppendElement(interp, l, g); Tcl_AppendElement(interp, ObjStr(l)); DECR_REF_COUNT(l); @@ -3554,7 +3563,7 @@ */ static int -getAllObjectMixinsOf(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfClass *startCl, +GetAllObjectMixinsOf(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfClass *startCl, int isMixin, int appendResult, CONST char *pattern, NsfObject *matchObject) { int rc = 0, new = 0; @@ -3567,7 +3576,7 @@ * check all subclasses of startCl for mixins */ for (sc = startCl->sub; sc; sc = sc->nextPtr) { - rc = getAllObjectMixinsOf(interp, destTable, sc->cl, isMixin, appendResult, pattern, matchObject); + rc = GetAllObjectMixinsOf(interp, destTable, sc->cl, isMixin, appendResult, pattern, matchObject); if (rc) {return rc;} } /*fprintf(stderr, "check subclasses of %s done\n", ObjStr(startCl->object.cmdName));*/ @@ -3584,7 +3593,7 @@ assert(cl); /*fprintf(stderr, "check %s mixinof %s\n", className(cl), ObjStr(startCl->object.cmdName));*/ - rc = getAllObjectMixinsOf(interp, destTable, cl, isMixin, appendResult, pattern, matchObject); + rc = GetAllObjectMixinsOf(interp, destTable, cl, isMixin, appendResult, pattern, matchObject); /* fprintf(stderr, "check %s mixinof %s done\n", className(cl), ObjStr(startCl->object.cmdName));*/ if (rc) {return rc;} @@ -3606,7 +3615,7 @@ object = NsfGetObjectFromCmdPtr(m->cmdPtr); assert(object); - rc = addToResultSet(interp, destTable, object, &new, appendResult, pattern, matchObject); + rc = AddToResultSet(interp, destTable, object, &new, appendResult, pattern, matchObject); if (rc == 1) {return rc;} } } @@ -3619,7 +3628,7 @@ */ static int -getAllClassMixinsOf(Tcl_Interp *interp, Tcl_HashTable *destTable, /*@notnull@*/ NsfClass *startCl, +GetAllClassMixinsOf(Tcl_Interp *interp, Tcl_HashTable *destTable, /*@notnull@*/ NsfClass *startCl, int isMixin, int appendResult, CONST char *pattern, NsfObject *matchObject) { int rc = 0, new = 0; @@ -3635,15 +3644,15 @@ * the startCl is a per class mixin, add it to the result set */ if (isMixin) { - rc = addToResultSet(interp, destTable, &startCl->object, &new, appendResult, pattern, matchObject); + rc = AddToResultSet(interp, destTable, &startCl->object, &new, appendResult, pattern, matchObject); if (rc == 1) {return rc;} /* * check all subclasses of startCl for mixins */ for (sc = startCl->sub; sc; sc = sc->nextPtr) { if (sc->cl != startCl) { - rc = getAllClassMixinsOf(interp, destTable, sc->cl, isMixin, appendResult, pattern, matchObject); + rc = GetAllClassMixinsOf(interp, destTable, sc->cl, isMixin, appendResult, pattern, matchObject); if (rc) {return rc;} } else { /* TODO: sanity check; it seems that we can create via @@ -3669,11 +3678,11 @@ cl = NsfGetClassFromCmdPtr(m->cmdPtr); assert(cl); - rc = addToResultSet(interp, destTable, &cl->object, &new, appendResult, pattern, matchObject); + rc = AddToResultSet(interp, destTable, &cl->object, &new, appendResult, pattern, matchObject); if (rc == 1) {return rc;} if (new) { /*fprintf(stderr, "... new\n");*/ - rc = getAllClassMixinsOf(interp, destTable, cl, 1, appendResult, pattern, matchObject); + rc = GetAllClassMixinsOf(interp, destTable, cl, 1, appendResult, pattern, matchObject); if (rc) {return rc;} } } @@ -3688,7 +3697,7 @@ */ static int -getAllClassMixins(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfClass *startCl, +GetAllClassMixins(Tcl_Interp *interp, Tcl_HashTable *destTable, NsfClass *startCl, int withGuards, CONST char *pattern, NsfObject *matchObject) { int rc = 0, new = 0; NsfClass *cl; @@ -3711,17 +3720,17 @@ /* fprintf(stderr, "class mixin found: %s\n", className(cl)); */ if ((withGuards) && (m->clientData)) { - /* fprintf(stderr, "addToResultSetWithGuards: %s\n", className(cl)); */ - rc = addToResultSetWithGuards(interp, destTable, cl, m->clientData, &new, 1, pattern, matchObject); + /* fprintf(stderr, "AddToResultSetWithGuards: %s\n", className(cl)); */ + rc = AddToResultSetWithGuards(interp, destTable, cl, m->clientData, &new, 1, pattern, matchObject); } else { - /* fprintf(stderr, "addToResultSet: %s\n", className(cl)); */ - rc = addToResultSet(interp, destTable, &cl->object, &new, 1, pattern, matchObject); + /* fprintf(stderr, "AddToResultSet: %s\n", className(cl)); */ + rc = AddToResultSet(interp, destTable, &cl->object, &new, 1, pattern, matchObject); } if (rc == 1) {return rc;} if (new) { - /* fprintf(stderr, "class mixin getAllClassMixins for: %s (%s)\n", className(cl), ObjStr(startCl->object.cmdName)); */ - rc = getAllClassMixins(interp, destTable, cl, withGuards, pattern, matchObject); + /* fprintf(stderr, "class mixin GetAllClassMixins for: %s (%s)\n", className(cl), ObjStr(startCl->object.cmdName)); */ + rc = GetAllClassMixins(interp, destTable, cl, withGuards, pattern, matchObject); if (rc) {return rc;} } } @@ -3732,8 +3741,8 @@ * check all superclasses of startCl for classmixins */ for (sc = startCl->super; sc; sc = sc->nextPtr) { - /* fprintf(stderr, "Superclass getAllClassMixins for %s (%s)\n", ObjStr(sc->cl->object.cmdName), ObjStr(startCl->object.cmdName)); */ - rc = getAllClassMixins(interp, destTable, sc->cl, withGuards, pattern, matchObject); + /* fprintf(stderr, "Superclass GetAllClassMixins for %s (%s)\n", ObjStr(sc->cl->object.cmdName), ObjStr(startCl->object.cmdName)); */ + rc = GetAllClassMixins(interp, destTable, sc->cl, withGuards, pattern, matchObject); if (rc) {return rc;} } return rc; @@ -3759,7 +3768,7 @@ } static void -removeFromObjectMixinsOf(Tcl_Command cmd, NsfCmdList *cmdlist) { +RemoveFromObjectMixinsOf(Tcl_Command cmd, NsfCmdList *cmdlist) { for ( ; cmdlist; cmdlist = cmdlist->nextPtr) { NsfClass *cl = NsfGetClassFromCmdPtr(cmdlist->cmdPtr); NsfClassOpt *clopt = cl ? cl->opt : NULL; @@ -3904,7 +3913,7 @@ */ Tcl_InitHashTable(commandTable, TCL_ONE_WORD_KEYS); MEM_COUNT_ALLOC("Tcl_InitHashTable", commandTable); - getAllClassMixinsOf(interp, commandTable, cl, 1, 0, NULL, NULL); + GetAllClassMixinsOf(interp, commandTable, cl, 1, 0, NULL, NULL); for (hPtr = Tcl_FirstHashEntry(commandTable, &hSrch); hPtr; hPtr = Tcl_NextHashEntry(&hSrch)) { @@ -3946,7 +3955,7 @@ * */ static NsfCmdList * -seekCurrent(Tcl_Command currentCmd, register NsfCmdList *cmdl) { +SeekCurrent(Tcl_Command currentCmd, register NsfCmdList *cmdl) { if (currentCmd) { /* go forward to current class */ for (; cmdl; cmdl = cmdl->nextPtr) { @@ -3976,7 +3985,7 @@ /* ensure that the mixin order is not invalid, otherwise compute order */ assert(object->flags & NSF_MIXIN_ORDER_VALID); /*MixinComputeDefined(interp, object);*/ - cmdList = seekCurrent(object->mixinStack->currentCmdPtr, object->mixinOrder); + cmdList = SeekCurrent(object->mixinStack->currentCmdPtr, object->mixinOrder); RUNTIME_STATE(interp)->cmdPtr = cmdList ? cmdList->cmdPtr : NULL; /* fprintf(stderr, "MixinSearch searching for '%s' %p\n", methodName, cmdList); */ @@ -4058,7 +4067,7 @@ Tcl_Obj *l = Tcl_NewListObj(0, NULL); Tcl_Obj *g = (Tcl_Obj*) m->clientData; Tcl_ListObjAppendElement(interp, l, mixinClass->object.cmdName); - Tcl_ListObjAppendElement(interp, l, NsfGlobalObjs[XOTE_GUARD_OPTION]); + Tcl_ListObjAppendElement(interp, l, NsfGlobalObjs[NSF_GUARD_OPTION]); Tcl_ListObjAppendElement(interp, l, g); Tcl_ListObjAppendElement(interp, list, l); } else { @@ -4186,7 +4195,7 @@ /*fprintf(stderr, "checking guard **%s**\n", ObjStr(guardObj));*/ rst->guardCount++; - result = checkConditionInScope(interp, guardObj); + result = CheckConditionInScope(interp, guardObj); rst->guardCount--; /*fprintf(stderr, "checking guard **%s** returned rc=%d\n", ObjStr(guardObj), rc);*/ @@ -4250,8 +4259,8 @@ /* static void GuardAddList(Tcl_Interp *interp, NsfCmdList *dest, ClientData source) { - NsfTclObjList *s = (NsfTclObjList*) source; - GuardAdd(interp, dest, (Tcl_Obj*) s->content); + NsfTclObjList *s = (NsfTclObjList *)source; + GuardAdd(interp, dest, (Tcl_Obj *)s->content); s = s->nextPtr; } */ @@ -4413,7 +4422,7 @@ NsfClass *cl; if (Tcl_ListObjGetElements(interp, nameObj, &ocName, &ovName) == TCL_OK && ocName > 1) { - if (ocName == 3 && !strcmp(ObjStr(ovName[1]), NsfGlobalStrings[XOTE_GUARD_OPTION])) { + if (ocName == 3 && !strcmp(ObjStr(ovName[1]), NsfGlobalStrings[NSF_GUARD_OPTION])) { nameObj = ovName[0]; guardObj = ovName[2]; } @@ -4597,7 +4606,7 @@ Tcl_Obj *g = (Tcl_Obj*) f->clientData; Tcl_ListObjAppendElement(interp, innerList, Tcl_NewStringObj(simpleName, -1)); - Tcl_ListObjAppendElement(interp, innerList, NsfGlobalObjs[XOTE_GUARD_OPTION]); + Tcl_ListObjAppendElement(interp, innerList, NsfGlobalObjs[NSF_GUARD_OPTION]); Tcl_ListObjAppendElement(interp, innerList, g); Tcl_ListObjAppendElement(interp, list, innerList); } else { @@ -4806,8 +4815,8 @@ /* search per-object filters */ if (object->opt && CmdListFindCmdInList(cmd, object->opt->filters)) { Tcl_ListObjAppendElement(interp, list, object->cmdName); - Tcl_ListObjAppendElement(interp, list, NsfGlobalObjs[XOTE_OBJECT]); - Tcl_ListObjAppendElement(interp, list, NsfGlobalObjs[XOTE_FILTER]); + Tcl_ListObjAppendElement(interp, list, NsfGlobalObjs[NSF_OBJECT]); + Tcl_ListObjAppendElement(interp, list, NsfGlobalObjs[NSF_FILTER]); Tcl_ListObjAppendElement(interp, list, Tcl_NewStringObj(Tcl_GetCommandName(interp, cmd), -1)); return list; @@ -4819,7 +4828,7 @@ if (opt && opt->classfilters) { if (CmdListFindCmdInList(cmd, opt->classfilters)) { Tcl_ListObjAppendElement(interp, list, pl->cl->object.cmdName); - Tcl_ListObjAppendElement(interp, list, NsfGlobalObjs[XOTE_FILTER]); + Tcl_ListObjAppendElement(interp, list, NsfGlobalObjs[NSF_FILTER]); Tcl_ListObjAppendElement(interp, list, Tcl_NewStringObj(Tcl_GetCommandName(interp, cmd), -1)); return list; @@ -4847,7 +4856,7 @@ FilterComputeDefined(interp, object); */ assert(object->flags & NSF_FILTER_ORDER_VALID); - cmdList = seekCurrent(object->filterStack->currentCmdPtr, object->filterOrder); + cmdList = SeekCurrent(object->filterStack->currentCmdPtr, object->filterOrder); while (cmdList) { if (Tcl_Command_cmdEpoch(cmdList->cmdPtr)) { @@ -4857,7 +4866,7 @@ Tcl_GetCommandName(interp, (Tcl_Command)cmdList->cmdPtr), objectName(object)); */ object->filterStack->currentCmdPtr = cmdList->cmdPtr; - cmdList = seekCurrent(object->filterStack->currentCmdPtr, object->filterOrder); + cmdList = SeekCurrent(object->filterStack->currentCmdPtr, object->filterOrder); } else { /* ok. we found it */ if (cmdList->clorobj && !NsfObjectIsClass(&cmdList->clorobj->object)) { @@ -5076,7 +5085,7 @@ } static int -varExists(Tcl_Interp *interp, NsfObject *object, CONST char *varName, CONST char *index, +VarExists(Tcl_Interp *interp, NsfObject *object, CONST char *varName, CONST char *index, int triggerTrace, int requireDefined) { Tcl_CallFrame frame, *framePtr = &frame; Var *varPtr, *arrayPtr; @@ -5093,7 +5102,7 @@ varPtr = TclLookupVar(interp, varName, index, flags, "access", /*createPart1*/ 0, /*createPart2*/ 0, &arrayPtr); /* - fprintf(stderr, "varExists %s varPtr %p requireDefined %d, triggerTrace %d, isundef %d\n", + fprintf(stderr, "VarExists %s varPtr %p requireDefined %d, triggerTrace %d, isundef %d\n", varName, varPtr, requireDefined, triggerTrace, @@ -5149,7 +5158,7 @@ (overflow ? "..." : ""), Tcl_GetErrorLine(interp))); } -static int +static int ByteCompiled(register Tcl_Interp *interp, Proc *procPtr, CONST char *body) { Tcl_Obj *bodyPtr = procPtr->bodyPtr; Namespace *nsPtr = procPtr->cmdPtr->nsPtr; @@ -5241,12 +5250,13 @@ } static void -getVarAndNameFromHash(Tcl_HashEntry *hPtr, Var **val, Tcl_Obj **varNameObj) { +GetVarAndNameFromHash(Tcl_HashEntry *hPtr, Var **val, Tcl_Obj **varNameObj) { *val = VarHashGetValue(hPtr); *varNameObj = VarHashGetKey(*val); } -void NsfProcDeleteProc(ClientData clientData) { +void +NsfProcDeleteProc(ClientData clientData) { NsfProcContext *ctxPtr = (NsfProcContext *)clientData; (*ctxPtr->oldDeleteProc)(ctxPtr->oldDeleteData); if (ctxPtr->paramDefs) { @@ -5257,13 +5267,15 @@ FREE(NsfProcContext, ctxPtr); } -static NsfParam *ParamsNew(int nr) { +static NsfParam * +ParamsNew(int nr) { NsfParam *paramsPtr = NEW_ARRAY(NsfParam, nr+1); memset(paramsPtr, 0, sizeof(NsfParam)*(nr+1)); return paramsPtr; } -static void ParamsFree(NsfParam *paramsPtr) { +static void +ParamsFree(NsfParam *paramsPtr) { NsfParam *paramPtr; /*fprintf(stderr, "ParamsFree %p\n", paramsPtr);*/ @@ -5345,7 +5357,7 @@ */ static void -ParamDefsFormatOption(Tcl_Interp *interp, Tcl_Obj *nameStringObj, CONST char* option, +ParamDefsFormatOption(Tcl_Interp *interp, Tcl_Obj *nameStringObj, CONST char *option, int *colonWritten, int *firstOption) { if (!*colonWritten) { Tcl_AppendLimitedToObj(nameStringObj, ":", 1, INT_MAX, NULL); @@ -5380,7 +5392,7 @@ int outputRequired = (isNonpos && (pPtr->flags & NSF_ARG_REQUIRED)); int outputOptional = (!isNonpos && !(pPtr->flags & NSF_ARG_REQUIRED) && !pPtr->defaultValue && - pPtr->converter != convertToNothing); + pPtr->converter != ConvertToNothing); first = 1; colonWritten = 0; @@ -5436,7 +5448,7 @@ return listObj; } -static Tcl_Obj* +static Tcl_Obj * ParamDefsSyntax(Tcl_Interp *interp, NsfParam CONST *paramPtr) { Tcl_Obj *argStringObj = Tcl_NewStringObj("", 0); NsfParam CONST *pPtr; @@ -5460,7 +5472,8 @@ return argStringObj; } -static void ParsedParamFree(NsfParsedParam *parsedParamPtr) { +static void +ParsedParamFree(NsfParsedParam *parsedParamPtr) { /*fprintf(stderr, "ParsedParamFree %p, npargs %p\n", parsedParamPtr, parsedParamPtr->paramDefs);*/ if (parsedParamPtr->paramDefs) { ParamDefsFree(parsedParamPtr->paramDefs); @@ -5475,7 +5488,7 @@ #if defined(NRE) static int FinalizeProcMethod(ClientData data[], Tcl_Interp *interp, int result) { - parseContext *pcPtr = data[0]; + ParseContext *pcPtr = data[0]; NsfCallStackContent *cscPtr = data[1]; CONST char *methodName = data[2]; NsfObject *object = cscPtr->self; @@ -5519,7 +5532,7 @@ # if defined(TCL_STACK_ALLOC_TRACE) fprintf(stderr, "---- FinalizeProcMethod calls releasePc, stackFree %p\n", pcPtr); # endif - parseContextRelease(pcPtr); + ParseContextRelease(pcPtr); TclStackFree(interp, pcPtr); } @@ -5542,9 +5555,9 @@ NsfObjectOpt *opt = object->opt; NsfParamDefs *paramDefs; #if defined(NRE) - parseContext *pcPtr = NULL; + ParseContext *pcPtr = NULL; #else - parseContext pc, *pcPtr = &pc; + ParseContext pc, *pcPtr = &pc; #endif assert(object); @@ -5614,7 +5627,7 @@ } #ifdef DISPATCH_TRACE - printCall(interp, "ProcMethodDispatch", objc, objv); + PrintCall(interp, "ProcMethodDispatch", objc, objv); fprintf(stderr, "\tproc=%s\n", Tcl_GetCommandName(interp, cmdPtr)); #endif @@ -5630,9 +5643,9 @@ if (paramDefs && paramDefs->paramsPtr) { #if defined(NRE) - pcPtr = (parseContext *) TclStackAlloc(interp, sizeof(parseContext)); + pcPtr = (ParseContext *) TclStackAlloc(interp, sizeof(ParseContext)); # if defined(TCL_STACK_ALLOC_TRACE) - fprintf(stderr, "---- parseContext alloc %p\n", pcPtr); + fprintf(stderr, "---- ParseContext alloc %p\n", pcPtr); # endif #endif result = ProcessMethodArguments(pcPtr, interp, object, 1, paramDefs, methodName, objc, objv); @@ -5670,7 +5683,7 @@ #if !defined(NRE) result = TclObjInterpProcCore(interp, objv[0], 1, &MakeProcError); if (releasePc) { - parseContextRelease(&pc); + ParseContextRelease(&pc); } #else { @@ -5695,7 +5708,7 @@ #if defined(PRE86) # ifdef DISPATCH_TRACE - printExit(interp, "ProcMethodDispatch", objc, objv, result); + PrintExit(interp, "ProcMethodDispatch", objc, objv, result); /* fprintf(stderr, " returnCode %d nsf rc %d\n", Tcl_Interp_returnCode(interp), result);*/ # endif @@ -5762,15 +5775,15 @@ } #ifdef DISPATCH_TRACE - printCall(interp, "CmdMethodDispatch cmd", objc, objv); + PrintCall(interp, "CmdMethodDispatch cmd", objc, objv); fprintf(stderr, "\tcmd=%s\n", Tcl_GetCommandName(interp, cmdPtr)); #endif /*fprintf(stderr, "CmdDispatch obj %p %p %s\n", obj, methodName, methodName);*/ result = Tcl_NRCallObjProc(interp, Tcl_Command_objProc(cmdPtr), cp, objc, objv); #ifdef DISPATCH_TRACE - printExit(interp, "CmdMethodDispatch cmd", objc, objv, result); + PrintExit(interp, "CmdMethodDispatch cmd", objc, objv, result); #endif if (cscPtr) { @@ -5819,7 +5832,7 @@ #endif #if 0 -static Tcl_Obj* +static Tcl_Obj * SubcmdObj(Tcl_Interp *interp, CONST char *start, size_t len) { Tcl_Obj *checker = Tcl_NewStringObj("sub=", 4); Tcl_AppendLimitedToObj(checker, start, len, INT_MAX, NULL); @@ -5846,7 +5859,7 @@ static int DispatchDefaultMethod(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { int result; - Tcl_Obj *methodObj = NsfMethodObj(interp, (NsfObject *)clientData, XO_o_defaultmethod_idx); + Tcl_Obj *methodObj = NsfMethodObj(interp, (NsfObject *)clientData, NSF_o_defaultmethod_idx); if (methodObj) { Tcl_Obj *tov[2]; @@ -5901,10 +5914,10 @@ /* flag, that destroy was called and invoke the method */ object->flags |= NSF_DESTROY_CALLED; - if (CallDirectly(interp, object, XO_o_destroy_idx, &methodObj)) { + if (CallDirectly(interp, object, NSF_o_destroy_idx, &methodObj)) { result = NsfODestroyMethod(interp, object); } else { - result = callMethod(object, interp, methodObj, 2, 0, flags); + result = CallMethod(object, interp, methodObj, 2, 0, flags); } if (result != TCL_OK) { @@ -5948,7 +5961,7 @@ int result; NsfObject *object = (NsfObject*)clientData; - Tcl_Obj *unknownObj = NsfMethodObj(interp, object, XO_o_unknown_idx); + Tcl_Obj *unknownObj = NsfMethodObj(interp, object, NSF_o_unknown_idx); if (unknownObj && methodObj != unknownObj && (flags & NSF_CM_NO_UNKNOWN) == 0) { /* @@ -6056,7 +6069,6 @@ * actual object in the runtime state, flag ObjectDispatch via * NSF_CM_DELGATE to use it. */ - /*xxxx*/ rst->delegatee = object; if (objc < 2) { result = DispatchDefaultMethod(cp, interp, objc, objv); @@ -6111,16 +6123,17 @@ } else { /* - The cmd has no client data - */ + * The cmd has no client data + */ /*fprintf(stderr, "cmdMethodDispatch %s %s, nothing stacked\n",objectName(object), methodName);*/ - return CmdMethodDispatch(clientData, interp, objc, objv, methodName, object, cmd, NULL); } result = CmdMethodDispatch(cp, interp, objc, objv, methodName, object, cmd, cscPtr); - /* make sure, that csc is still in the scope; therefore, csc is - currently on the top scope of this function */ + /* + * Make sure, that csc is still in the scope; therefore, csc is + * currently on the top scope of this function + */ CscFinish(interp, cscPtr); return result; @@ -6162,7 +6175,7 @@ objectName(object), objc, ObjStr(cmdObj), methodName);*/ #ifdef DISPATCH_TRACE - printCall(interp, "DISPATCH", objc, objv); + PrintCall(interp, "DISPATCH", objc, objv); #endif objflags = object->flags; /* avoid stalling */ @@ -6245,7 +6258,7 @@ cmd = Tcl_GetCommandFromObj(interp, methodObj); if (cmd) { CONST char *mn = Tcl_GetCommandName(interp, cmd); - if (isClassName(methodName)) { + if (IsClassName(methodName)) { CONST char *className = NSCutNsfClasses(methodName); Tcl_DString ds, *dsPtr = &ds; DSTRING_INIT(dsPtr); @@ -6302,9 +6315,6 @@ } if (!unknown) { - /* xxxx */ - /*fprintf(stderr, "ObjectDispatch calls MethodDispatch with obj = %s frameType %d method %s flags %.6x\n", - objectName(object), frameType, methodName, flags);*/ if (flags & NSF_CM_DELGATE && rst->delegatee) { /* * We want to execute the method on the delegatee, so we have @@ -6365,7 +6375,7 @@ exit_dispatch: #ifdef DISPATCH_TRACE - printExit(interp, "DISPATCH", objc, objv, result); + PrintExit(interp, "DISPATCH", objc, objv, result); #endif if (mixinStackPushed && object->mixinStack) @@ -6405,7 +6415,8 @@ * Proc-Creation */ -static Tcl_Obj *addPrefixToBody(Tcl_Obj *body, int paramDefs, NsfParsedParam *paramPtr) { +static Tcl_Obj * +AddPrefixToBody(Tcl_Obj *body, int paramDefs, NsfParsedParam *paramPtr) { Tcl_Obj *resultBody = Tcl_NewStringObj("", 0); INCR_REF_COUNT(resultBody); @@ -6420,7 +6431,7 @@ #define NEW_STRING(target, p, l) target = ckalloc(l+1); strncpy(target, p, l); *((target)+l) = '\0' NSF_INLINE static int -noMetaChars(CONST char *pattern) { +NoMetaChars(CONST char *pattern) { register char c; CONST char *p = pattern; @@ -6437,7 +6448,8 @@ * type converter */ /* we could define parameterTypes with a converter, setter, canCheck, name */ -static int convertToString(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToString(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { *clientData = (char *)ObjStr(objPtr); *outObjPtr = objPtr; @@ -6453,18 +6465,19 @@ "lower", "print", "punct", "space", "true", "upper", "wordchar", "xdigit", NULL}; -static int convertToTclobj(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToTclobj(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { Tcl_Obj *objv[3]; int result; if (pPtr->converterArg) { - /*fprintf(stderr, "convertToStringType %s (must be %s)\n", ObjStr(objPtr), ObjStr(pPtr->converterArg));*/ + /*fprintf(stderr, "ConvertToStringType %s (must be %s)\n", ObjStr(objPtr), ObjStr(pPtr->converterArg));*/ objv[1] = pPtr->converterArg; objv[2] = objPtr; - result = NsfCallCommand(interp, XOTE_IS, 3, objv); + result = NsfCallCommand(interp, NSF_IS, 3, objv); if (result == TCL_OK) { int success; Tcl_GetIntFromObj(interp, Tcl_GetObjResult(interp), &success); @@ -6484,13 +6497,15 @@ return result; } -static int convertToNothing(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToNothing(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { *outObjPtr = objPtr; return TCL_OK; } -static int convertToBoolean(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToBoolean(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int result, bool; result = Tcl_GetBooleanFromObj(interp, objPtr, &bool); @@ -6505,7 +6520,8 @@ return result; } -static int convertToInteger(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToInteger(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int result, i; @@ -6521,12 +6537,14 @@ return result; } -static int convertToSwitch(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToSwitch(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { - return convertToBoolean(interp, objPtr, pPtr, clientData, outObjPtr); + return ConvertToBoolean(interp, objPtr, pPtr, clientData, outObjPtr); } -static int objectOfType(Tcl_Interp *interp, NsfObject *object, CONST char *what, Tcl_Obj *objPtr, +static int +IsObjectOfType(Tcl_Interp *interp, NsfObject *object, CONST char *what, Tcl_Obj *objPtr, NsfParam CONST *pPtr) { NsfClass *cl; Tcl_DString ds, *dsPtr = &ds; @@ -6549,26 +6567,29 @@ return TCL_ERROR; } -static int convertToObject(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, - ClientData *clientData, Tcl_Obj **outObjPtr) { +static int +ConvertToObject(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, + ClientData *clientData, Tcl_Obj **outObjPtr) { *outObjPtr = objPtr; if (GetObjectFromObj(interp, objPtr, (NsfObject **)clientData) == TCL_OK) { - return objectOfType(interp, (NsfObject *)*clientData, "object", objPtr, pPtr); + return IsObjectOfType(interp, (NsfObject *)*clientData, "object", objPtr, pPtr); } return NsfObjErrType(interp, objPtr, "object", pPtr->name); } -static int convertToClass(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, - ClientData *clientData, Tcl_Obj **outObjPtr) { +static int +ConvertToClass(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, + ClientData *clientData, Tcl_Obj **outObjPtr) { *outObjPtr = objPtr; if (GetClassFromObj(interp, objPtr, (NsfClass **)clientData, NULL) == TCL_OK) { - return objectOfType(interp, (NsfObject *)*clientData, "class", objPtr, pPtr); + return IsObjectOfType(interp, (NsfObject *)*clientData, "class", objPtr, pPtr); } return NsfObjErrType(interp, objPtr, "class", pPtr->name); } -static int convertToRelation(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, - ClientData *clientData, Tcl_Obj **outObjPtr) { +static int +ConvertToRelation(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, + ClientData *clientData, Tcl_Obj **outObjPtr) { /* NsfRelationCmd is the real setter, which checks the values according to the relation type (Class, List of Class, list of filters; we treat it here just like a tclobj */ @@ -6577,8 +6598,9 @@ return TCL_OK; } -static int convertViaCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, - ClientData *clientData, Tcl_Obj **outObjPtr) { +static int +ConvertViaCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, + ClientData *clientData, Tcl_Obj **outObjPtr) { Tcl_Obj *ov[5]; Tcl_Obj *savedResult; int result, oc; @@ -6598,12 +6620,12 @@ savedResult = NULL; } - ov[0] = pPtr->slotObj ? pPtr->slotObj : NsfGlobalObjs[XOTE_METHOD_PARAMETER_SLOT_OBJ]; + ov[0] = pPtr->slotObj ? pPtr->slotObj : NsfGlobalObjs[NSF_METHOD_PARAMETER_SLOT_OBJ]; ov[1] = pPtr->converterName; ov[2] = pPtr->nameObj; ov[3] = objPtr; - /*fprintf(stderr, "convertViaCmd call converter %s (refCount %d) on %s paramPtr %p\n", + /*fprintf(stderr, "ConvertViaCmd call converter %s (refCount %d) on %s paramPtr %p\n", ObjStr(pPtr->converterName), pPtr->converterName->refCount, ObjStr(ov[0]), pPtr);*/ oc = 4; if (pPtr->converterArg) { @@ -6622,7 +6644,7 @@ *outObjPtr = objPtr; if (result == TCL_OK) { - /*fprintf(stderr, "convertViaCmd could convert %s to '%s' paramPtr %p, is_converter %d\n", + /*fprintf(stderr, "ConvertViaCmd could convert %s to '%s' paramPtr %p, is_converter %d\n", ObjStr(objPtr), ObjStr(Tcl_GetObjResult(interp)),pPtr, pPtr->flags & NSF_ARG_IS_CONVERTER);*/ if (pPtr->flags & NSF_ARG_IS_CONVERTER) { @@ -6649,12 +6671,13 @@ return result; } -static int convertToObjpattern(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int +ConvertToObjpattern(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { Tcl_Obj *patternObj = objPtr; CONST char *pattern = ObjStr(objPtr); - if (noMetaChars(pattern)) { + if (NoMetaChars(pattern)) { /* we have no meta characters, we try to check for an existing object */ NsfObject *object = NULL; GetObjectFromObj(interp, objPtr, &object); @@ -6681,7 +6704,7 @@ return TCL_OK; } -static Tcl_Obj* +static Tcl_Obj * ParamCheckObj(Tcl_Interp *interp, CONST char *start, size_t len) { Tcl_Obj *checker = Tcl_NewStringObj("type=", 5); Tcl_AppendLimitedToObj(checker, start, len, INT_MAX, NULL); @@ -6735,34 +6758,34 @@ paramPtr->nrArgs = 0; } else if (length >= 4 && strncmp(option, "arg=", 4) == 0) { if ((paramPtr->flags & (NSF_ARG_METHOD|NSF_ARG_RELATION)) == 0 - && paramPtr->converter != convertViaCmd) + && paramPtr->converter != ConvertViaCmd) return NsfVarErrMsg(interp, "option arg= only allowed for \"method\", \"relation\" or \"user-defined converter\"", (char *) NULL); paramPtr->converterArg = Tcl_NewStringObj(option+4, length-4); INCR_REF_COUNT(paramPtr->converterArg); } else if (strncmp(option, "switch", 6) == 0) { - result = ParamOptionSetConverter(interp, paramPtr, "switch", convertToSwitch); + result = ParamOptionSetConverter(interp, paramPtr, "switch", ConvertToSwitch); paramPtr->flags |= NSF_ARG_SWITCH; paramPtr->nrArgs = 0; assert(paramPtr->defaultValue == NULL); paramPtr->defaultValue = Tcl_NewBooleanObj(0); INCR_REF_COUNT(paramPtr->defaultValue); } else if (strncmp(option, "integer", MAX(3,length)) == 0) { - result = ParamOptionSetConverter(interp, paramPtr, "integer", convertToInteger); + result = ParamOptionSetConverter(interp, paramPtr, "integer", ConvertToInteger); } else if (strncmp(option, "boolean", 7) == 0) { - result = ParamOptionSetConverter(interp, paramPtr, "boolean", convertToBoolean); + result = ParamOptionSetConverter(interp, paramPtr, "boolean", ConvertToBoolean); } else if (strncmp(option, "object", 6) == 0) { - result = ParamOptionSetConverter(interp, paramPtr, "object", convertToObject); + result = ParamOptionSetConverter(interp, paramPtr, "object", ConvertToObject); } else if (strncmp(option, "class", 5) == 0) { - result = ParamOptionSetConverter(interp, paramPtr, "class", convertToClass); + result = ParamOptionSetConverter(interp, paramPtr, "class", ConvertToClass); } else if (strncmp(option, "relation", 8) == 0) { - result = ParamOptionSetConverter(interp, paramPtr, "relation", convertToRelation); + result = ParamOptionSetConverter(interp, paramPtr, "relation", ConvertToRelation); paramPtr->flags |= NSF_ARG_RELATION; /*paramPtr->type = "tclobj";*/ } else if (length >= 6 && strncmp(option, "type=", 5) == 0) { - if (paramPtr->converter != convertToObject && - paramPtr->converter != convertToClass) + if (paramPtr->converter != ConvertToObject && + paramPtr->converter != ConvertToClass) return NsfVarErrMsg(interp, "option type= only allowed for object or class", (char *) NULL); paramPtr->converterArg = Tcl_NewStringObj(option+5, length-5); INCR_REF_COUNT(paramPtr->converterArg); @@ -6782,14 +6805,14 @@ } if (found > -1) { /* converter is stringType */ - result = ParamOptionSetConverter(interp, paramPtr, "stringtype", convertToTclobj); + result = ParamOptionSetConverter(interp, paramPtr, "stringtype", ConvertToTclobj); paramPtr->converterArg = Tcl_NewStringObj(stringTypeOpts[i], -1); INCR_REF_COUNT(paramPtr->converterArg); } else { /* must be a converter defined via method */ paramPtr->converterName = ParamCheckObj(interp, option, length); INCR_REF_COUNT(paramPtr->converterName); - result = ParamOptionSetConverter(interp, paramPtr, ObjStr(paramPtr->converterName), convertViaCmd); + result = ParamOptionSetConverter(interp, paramPtr, ObjStr(paramPtr->converterName), ConvertViaCmd); } } @@ -6915,19 +6938,19 @@ /* postprocessing the parameter options */ if (paramPtr->converter == NULL) { - /* convertToTclobj() is the default converter */ - paramPtr->converter = convertToTclobj; - } /*else if (paramPtr->converter == convertViaCmd) {*/ + /* ConvertToTclobj() is the default converter */ + paramPtr->converter = ConvertToTclobj; + } /*else if (paramPtr->converter == ConvertViaCmd) {*/ - if ((paramPtr->slotObj || paramPtr->converter == convertViaCmd) && paramPtr->type) { + if ((paramPtr->slotObj || paramPtr->converter == ConvertViaCmd) && paramPtr->type) { Tcl_Obj *converterNameObj; CONST char *converterNameString; NsfObject *paramObj; NsfClass *pcl; Tcl_Command cmd; result = GetObjectFromObj(interp, paramPtr->slotObj ? paramPtr->slotObj : - NsfGlobalObjs[XOTE_METHOD_PARAMETER_SLOT_OBJ], + NsfGlobalObjs[NSF_METHOD_PARAMETER_SLOT_OBJ], ¶mObj); if (result != TCL_OK) return result; @@ -6942,25 +6965,25 @@ cmd = ObjectFindMethod(interp, paramObj, converterNameString, &pcl); if (cmd == NULL) { - if (paramPtr->converter == convertViaCmd) { + if (paramPtr->converter == ConvertViaCmd) { fprintf(stderr, "**** could not find checker method %s defined on %s\n", converterNameString, objectName(paramObj)); paramPtr->flags |= NSF_ARG_CURRENTLY_UNKNOWN; /* TODO: for the time being, we do not return an error here */ } - } else if (paramPtr->converter != convertViaCmd && + } else if (paramPtr->converter != ConvertViaCmd && strcmp(ObjStr(paramPtr->slotObj), - NsfGlobalStrings[XOTE_METHOD_PARAMETER_SLOT_OBJ]) != 0) { + NsfGlobalStrings[NSF_METHOD_PARAMETER_SLOT_OBJ]) != 0) { /* todo remove me */ fprintf(stderr, "**** checker method %s defined on %s shadows built-in converter\n", converterNameString, objectName(paramObj)); if (paramPtr->converterName == NULL) { paramPtr->converterName = converterNameObj; paramPtr->converter = NULL; - result = ParamOptionSetConverter(interp, paramPtr, converterNameString, convertViaCmd); + result = ParamOptionSetConverter(interp, paramPtr, converterNameString, ConvertViaCmd); } } - if ((paramPtr->flags & NSF_ARG_IS_CONVERTER) && paramPtr->converter != convertViaCmd) { + if ((paramPtr->flags & NSF_ARG_IS_CONVERTER) && paramPtr->converter != ConvertViaCmd) { return NsfVarErrMsg(interp, "option 'convert' only allowed for application-defined converters", (char *) NULL); @@ -7037,7 +7060,7 @@ */ lastParamPtr = paramPtr - 1; if (isArgsString(lastParamPtr->name)) { - lastParamPtr->converter = convertToNothing; + lastParamPtr->converter = ConvertToNothing; lastParamPtr->flags &= ~NSF_ARG_REQUIRED; } @@ -7096,10 +7119,10 @@ ov[2] = argList; INCR_REF_COUNT(ov[2]); /*fprintf(stderr, "final arglist = <%s>\n", ObjStr(argList)); */ - ov[3] = addPrefixToBody(body, 1, &parsedParam); + ov[3] = AddPrefixToBody(body, 1, &parsedParam); } else { /* no nonpos arguments */ ov[2] = args; - ov[3] = addPrefixToBody(body, 0, &parsedParam); + ov[3] = AddPrefixToBody(body, 0, &parsedParam); } Tcl_PushCallFrame(interp, (Tcl_CallFrame *)framePtr, nsPtr, 0); @@ -7203,14 +7226,14 @@ } static int -getMatchObject(Tcl_Interp *interp, Tcl_Obj *patternObj, Tcl_Obj *origObj, +GetMatchObject(Tcl_Interp *interp, Tcl_Obj *patternObj, Tcl_Obj *origObj, NsfObject **matchObject, CONST char **pattern) { if (patternObj) { *pattern = ObjStr(patternObj); if (IsNsfTclObj(interp, patternObj, matchObject)) { } else if (patternObj == origObj && **pattern != ':') { /* no meta chars, but no appropriate nsf object found, so - return empty; we could check above with noMetaChars(pattern) + return empty; we could check above with NoMetaChars(pattern) as well, but the only remaining case are leading colons and metachars. */ return 1; @@ -7219,7 +7242,8 @@ return 0; } -static void forwardCmdDeleteProc(ClientData clientData) { +static void +ForwardCmdDeleteProc(ClientData clientData) { ForwardCmdClientData *tcd = (ForwardCmdClientData *)clientData; if (tcd->cmdName) {DECR_REF_COUNT(tcd->cmdName);} if (tcd->subcommands) {DECR_REF_COUNT(tcd->subcommands);} @@ -7230,7 +7254,7 @@ } static int -forwardProcessOptions(Tcl_Interp *interp, Tcl_Obj *nameObj, +ForwardProcessOptions(Tcl_Interp *interp, Tcl_Obj *nameObj, Tcl_Obj *withDefault, int withEarlybinding, Tcl_Obj *withMethodprefix, int withObjscope, Tcl_Obj *withOnerror, int withVerbose, Tcl_Obj *target, int objc, Tcl_Obj * CONST objv[], @@ -7328,7 +7352,7 @@ if (result == TCL_OK) { *tcdp = tcd; } else { - forwardCmdDeleteProc((ClientData)tcd); + ForwardCmdDeleteProc((ClientData)tcd); } return result; } @@ -7378,7 +7402,7 @@ static NsfObjects * -computeSlotObjects(Tcl_Interp *interp, NsfObject *object, CONST char *pattern, int withRootClass) { +ComputeSlotObjects(Tcl_Interp *interp, NsfObject *object, CONST char *pattern, int withRootClass) { NsfObjects *slotObjects = NULL, **npl = &slotObjects; NsfClasses *pl, *fullPrecendenceList; NsfObject *childObject, *tmpObject; @@ -7429,7 +7453,7 @@ return slotObjects; } -static NsfClass* +static NsfClass * FindCalledClass(Tcl_Interp *interp, NsfObject *object) { NsfCallStackContent *cscPtr = CallStackGetTopFrame(interp, NULL); CONST char *methodName; @@ -7765,7 +7789,7 @@ } static Tcl_Obj * -computeLevelObj(Tcl_Interp *interp, CallStackLevel level) { +ComputeLevelObj(Tcl_Interp *interp, CallStackLevel level) { Tcl_CallFrame *framePtr; Tcl_Obj *resultObj; @@ -7808,9 +7832,9 @@ */ static int -unsetInAllNamespaces(Tcl_Interp *interp, Namespace *nsPtr, CONST char *name) { +UnsetInAllNamespaces(Tcl_Interp *interp, Namespace *nsPtr, CONST char *name) { int rc = 0; - fprintf(stderr, "### unsetInAllNamespaces variable '%s', current namespace '%s'\n", + fprintf(stderr, "### UnsetInAllNamespaces variable '%s', current namespace '%s'\n", name, nsPtr ? nsPtr->fullName : "NULL"); if (nsPtr) { @@ -7844,14 +7868,14 @@ Namespace *childNsPtr = (Namespace *) Tcl_GetHashValue(entryPtr); /*fprintf(stderr, "child = %s\n", childNsPtr->fullName);*/ entryPtr = Tcl_NextHashEntry(&search); - rc |= unsetInAllNamespaces(interp, childNsPtr, name); + rc |= UnsetInAllNamespaces(interp, childNsPtr, name); } } return rc; } static int -freeUnsetTraceVariable(Tcl_Interp *interp, NsfObject *object) { +FreeUnsetTraceVariable(Tcl_Interp *interp, NsfObject *object) { int result = TCL_OK; if (object->opt && object->opt->volatileVarName) { /* @@ -7862,14 +7886,14 @@ which will cause a destroy via var trace, which in turn clears the volatileVarName flag. */ - /*fprintf(stderr, "### freeUnsetTraceVariable %s\n", obj->opt->volatileVarName);*/ + /*fprintf(stderr, "### FreeUnsetTraceVariable %s\n", obj->opt->volatileVarName);*/ result = Tcl_UnsetVar2(interp, object->opt->volatileVarName, NULL, 0); if (result != TCL_OK) { int result = Tcl_UnsetVar2(interp, object->opt->volatileVarName, NULL, TCL_GLOBAL_ONLY); if (result != TCL_OK) { Namespace *nsPtr = (Namespace *) Tcl_GetCurrentNamespace(interp); - if (unsetInAllNamespaces(interp, nsPtr, object->opt->volatileVarName) == 0) { + if (UnsetInAllNamespaces(interp, nsPtr, object->opt->volatileVarName) == 0) { fprintf(stderr, "### don't know how to delete variable '%s' of volatile object\n", object->opt->volatileVarName); } @@ -7956,7 +7980,7 @@ /* * Remove this object from all per object mixin lists and clear the mixin list */ - removeFromObjectMixinsOf(object->id, opt->mixins); + RemoveFromObjectMixinsOf(object->id, opt->mixins); CmdListRemoveList(&opt->mixins, GuardDel); CmdListRemoveList(&opt->filters, GuardDel); @@ -8009,24 +8033,24 @@ } static void -tclDeletesObject(ClientData clientData) { +TclDeletesObject(ClientData clientData) { NsfObject *object = (NsfObject*)clientData; Tcl_Interp *interp; object->flags |= NSF_TCL_DELETE; - /*fprintf(stderr, "cmd dealloc %p tclDeletesObject (2d)\n", object->id, Tcl_Command_refCount(object->id)); + /*fprintf(stderr, "cmd dealloc %p TclDeletesObject (2d)\n", object->id, Tcl_Command_refCount(object->id)); */ #ifdef OBJDELETION_TRACE - fprintf(stderr, "tclDeletesObject %p obj->id %p flags %.6x\n", object, object->id, object->flags); + fprintf(stderr, "TclDeletesObject %p obj->id %p flags %.6x\n", object, object->id, object->flags); #endif if ((object->flags & NSF_DURING_DELETE) || !object->teardown) return; interp = object->teardown; # ifdef OBJDELETION_TRACE fprintf(stderr, "... %p %s\n", object, objectName(object)); # endif CallStackDestroyObject(interp, object); - /*fprintf(stderr, "tclDeletesObject %p DONE\n", object);*/ + /*fprintf(stderr, "TclDeletesObject %p DONE\n", object);*/ } /* @@ -8079,7 +8103,7 @@ /*fprintf(stderr, " +++ OBJ/CLS free: %s\n", objectName(object));*/ object->flags |= NSF_DELETED; - objTrace("ODestroy", object); + ObjTrace("ODestroy", object); DECR_REF_COUNT(object->cmdName); NsfCleanupObject(object); @@ -8130,7 +8154,7 @@ /* * Object creation: create object name (full name) and Tcl command */ -static NsfObject* +static NsfObject * PrimitiveOCreate(Tcl_Interp *interp, Tcl_Obj *nameObj, NsfClass *cl) { NsfObject *object = (NsfObject*)ckalloc(sizeof(NsfObject)); CONST char *nameString = ObjStr(nameObj); @@ -8154,7 +8178,7 @@ } object->id = Tcl_CreateObjCommand(interp, nameString, NsfObjDispatch, - (ClientData)object, tclDeletesObject); + (ClientData)object, TclDeletesObject); /*fprintf(stderr, "cmd alloc %p %d (%s)\n", object->id, Tcl_Command_refCount(object->id), nameString);*/ PrimitiveOInit(object, interp, nameString, cl); @@ -8163,7 +8187,7 @@ /*Tcl_GetCommandFromObj(interp, obj->cmdName);*/ INCR_REF_COUNT(object->cmdName); - objTrace("PrimitiveOCreate", object); + ObjTrace("PrimitiveOCreate", object); return object; } @@ -8178,8 +8202,8 @@ if (mcl) { int result; result = SetInstVar(interp, (NsfObject *)mcl, isMeta ? - NsfGlobalObjs[XOTE_DEFAULTMETACLASS] : - NsfGlobalObjs[XOTE_DEFAULTSUPERCLASS], NULL); + NsfGlobalObjs[NSF_DEFAULTMETACLASS] : + NsfGlobalObjs[NSF_DEFAULTSUPERCLASS], NULL); if (result == TCL_OK) { Tcl_Obj *nameObj = Tcl_GetObjResult(interp); @@ -8513,7 +8537,7 @@ * class create: creation of namespace + class full name * calls class object creation */ -static NsfClass* +static NsfClass * PrimitiveCCreate(Tcl_Interp *interp, Tcl_Obj *nameObj, NsfClass *class) { NsfClass *cl = (NsfClass*)ckalloc(sizeof(NsfClass)); CONST char *nameString = ObjStr(nameObj); @@ -8542,7 +8566,7 @@ return 0; } object->id = Tcl_CreateObjCommand(interp, nameString, NsfObjDispatch, - (ClientData)cl, tclDeletesObject); + (ClientData)cl, TclDeletesObject); /*fprintf(stderr, "cmd alloc %p %d (%s) cl\n", object->id, Tcl_Command_refCount(object->id), nameString);*/ PrimitiveOInit(object, interp, nameString, class); @@ -8554,7 +8578,7 @@ INCR_REF_COUNT(object->cmdName); PrimitiveCInit(cl, interp, nameString+2); - objTrace("PrimitiveCCreate", object); + ObjTrace("PrimitiveCCreate", object); return cl; } @@ -8624,7 +8648,7 @@ * call constructor "init", if it was not called before */ static int -doObjInitialization(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { +DoObjInitialization(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *methodObj, *savedObjResult = Tcl_GetObjResult(interp); /* save the result */ int result; @@ -8637,15 +8661,15 @@ /* * call configure methods (starting with '-') */ - if (CallDirectly(interp, object, XO_o_configure_idx, &methodObj)) { + if (CallDirectly(interp, object, NSF_o_configure_idx, &methodObj)) { ALLOC_ON_STACK(Tcl_Obj*, objc, tov); memcpy(tov+1, objv+2, sizeof(Tcl_Obj *)*(objc-2)); /* the provided name of the method is just for error reporting */ - tov[0] = methodObj ? methodObj : NsfGlobalObjs[XOTE_CONFIGURE]; + tov[0] = methodObj ? methodObj : NsfGlobalObjs[NSF_CONFIGURE]; result = NsfOConfigureMethod(interp, object, objc-1, tov); FREE_ON_STACK(Tcl_Obj*, tov); } else { - result = callMethod((ClientData) object, interp, methodObj, objc, objv+2, 0); + result = CallMethod((ClientData) object, interp, methodObj, objc, objv+2, 0); } if (result != TCL_OK) { @@ -8667,9 +8691,9 @@ Tcl_ListObjGetElements(interp, resultObj, &nobjc, &nobjv); /* CallDirectly does not make much sense, since init is already defined in predefined */ - methodObj = NsfMethodObj(interp, object, XO_o_init_idx); + methodObj = NsfMethodObj(interp, object, NSF_o_init_idx); if (methodObj) { - result = callMethod((ClientData) object, interp, methodObj, + result = CallMethod((ClientData) object, interp, methodObj, nobjc+2, nobjv, NSF_CM_NO_PROTECT); } object->flags |= NSF_INIT_CALLED; @@ -8686,7 +8710,7 @@ static int -hasMetaProperty(Tcl_Interp *interp, NsfClass *cl) { +HasMetaProperty(Tcl_Interp *interp, NsfClass *cl) { return cl->object.flags & NSF_IS_ROOT_META_CLASS; } @@ -8703,12 +8727,12 @@ int hasMCM = 0; /* is the class the most general meta-class? */ - if (hasMetaProperty(interp, cl)) + if (HasMetaProperty(interp, cl)) return 1; /* is the class a subclass of a meta-class? */ for (pl = ComputeOrder(cl, cl->order, Super); pl; pl = pl->nextPtr) { - if (hasMetaProperty(interp, pl->cl)) + if (HasMetaProperty(interp, pl->cl)) return 1; } @@ -8783,7 +8807,7 @@ INCR_REF_COUNT(nameObj); - if (CallDirectly(interp, &cl->object, XO_c_create_idx, &methodObj)) { + if (CallDirectly(interp, &cl->object, NSF_c_create_idx, &methodObj)) { result = NsfCCreateMethod(interp, cl, ObjStr(nameObj), 1, &nameObj); } else { result = NsfCallMethodWithArgs((ClientData)cl, interp, methodObj, @@ -9085,61 +9109,61 @@ } static int -forwardArg(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], - Tcl_Obj *forwardArgObj, ForwardCmdClientData *tcd, Tcl_Obj **out, +ForwardArg(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], + Tcl_Obj *ForwardArgObj, ForwardCmdClientData *tcd, Tcl_Obj **out, Tcl_Obj **freeList, int *inputArg, int *mapvalue, int firstPosArg, int *outputincr) { - CONST char *forwardArgString = ObjStr(forwardArgObj), *p; + CONST char *ForwardArgString = ObjStr(ForwardArgObj), *p; int totalargs = objc + tcd->nr_args - 1; - char c = *forwardArgString, c1; + char c = *ForwardArgString, c1; - /* per default every forwardArgString from the processed list corresponds to exactly - one forwardArgString in the computed final list */ + /* per default every ForwardArgString from the processed list corresponds to exactly + one ForwardArgString in the computed final list */ *outputincr = 1; - p = forwardArgString; + p = ForwardArgString; - /*fprintf(stderr, "ForwardArg: processing '%s'\n", forwardArgString);*/ + /*fprintf(stderr, "ForwardArg: processing '%s'\n", ForwardArgString);*/ - if (c == '%' && *(forwardArgString+1) == '@') { + if (c == '%' && *(ForwardArgString+1) == '@') { char *remainder = NULL; long pos; - forwardArgString += 2; - pos = strtol(forwardArgString, &remainder, 0); - /*fprintf(stderr, "strtol('%s) returned %ld '%s'\n", forwardArgString, pos, remainder);*/ - if (forwardArgString == remainder && *forwardArgString == 'e' - && !strncmp(forwardArgString, "end", 3)) { + ForwardArgString += 2; + pos = strtol(ForwardArgString, &remainder, 0); + /*fprintf(stderr, "strtol('%s) returned %ld '%s'\n", ForwardArgString, pos, remainder);*/ + if (ForwardArgString == remainder && *ForwardArgString == 'e' + && !strncmp(ForwardArgString, "end", 3)) { pos = -1; remainder += 3; } else if (pos < 0) { pos --; } - if (forwardArgString == remainder || abs(pos) > totalargs) { + if (ForwardArgString == remainder || abs(pos) > totalargs) { return NsfVarErrMsg(interp, "forward: invalid index specified in argument ", - ObjStr(forwardArgObj), (char *) NULL); + ObjStr(ForwardArgObj), (char *) NULL); } if (!remainder || *remainder != ' ') { - return NsfVarErrMsg(interp, "forward: invaild syntax in '", ObjStr(forwardArgObj), + return NsfVarErrMsg(interp, "forward: invaild syntax in '", ObjStr(ForwardArgObj), "' use: %@ ", (char *) NULL); } - forwardArgString = ++remainder; + ForwardArgString = ++remainder; /* in case we address from the end, we reduct further to distinguish from -1 (void) */ if (pos<0) pos--; /*fprintf(stderr, "remainder = '%s' pos = %ld\n", remainder, pos);*/ *mapvalue = pos; - forwardArgString = remainder; - c = *forwardArgString; + ForwardArgString = remainder; + c = *ForwardArgString; } if (c == '%') { Tcl_Obj *list = NULL, **listElements; int nrArgs = objc-1, nrPosArgs = objc-firstPosArg, nrElements = 0; char *firstActualArgument = nrArgs>0 ? ObjStr(objv[1]) : NULL; - c = *++forwardArgString; - c1 = *(forwardArgString+1); + c = *++ForwardArgString; + c1 = *(ForwardArgString+1); - if (c == 's' && !strcmp(forwardArgString, "self")) { + if (c == 's' && !strcmp(ForwardArgString, "self")) { *out = tcd->object->cmdName; - } else if (c == 'p' && !strcmp(forwardArgString, "proc")) { + } else if (c == 'p' && !strcmp(ForwardArgString, "proc")) { CONST char *methodName = ObjStr(objv[0]); /* if we dispatch a method via ".", we do not want to see the "." in the %proc, e.g. for the interceptor slots (such as @@ -9152,9 +9176,9 @@ } else if (c == '1' && (c1 == '\0' || c1 == ' ')) { if (c1 != '\0') { - if (Tcl_ListObjIndex(interp, forwardArgObj, 1, &list) != TCL_OK) { + if (Tcl_ListObjIndex(interp, ForwardArgObj, 1, &list) != TCL_OK) { return NsfVarErrMsg(interp, "forward: %1 must be followed by a valid list, given: '", - ObjStr(forwardArgObj), "'", (char *) NULL); + ObjStr(ForwardArgObj), "'", (char *) NULL); } if (Tcl_ListObjGetElements(interp, list, &nrElements, &listElements) != TCL_OK) { return NsfVarErrMsg(interp, "forward: %1 contains invalid list '", @@ -9186,12 +9210,12 @@ int i, insertRequired, done = 0; /*fprintf(stderr, "process flag '%s'\n", firstActualArgument);*/ - if (Tcl_ListObjGetElements(interp, forwardArgObj, &nrElements, &listElements) != TCL_OK) { - return NsfVarErrMsg(interp, "forward: '", forwardArgString, "' is not a valid list", + if (Tcl_ListObjGetElements(interp, ForwardArgObj, &nrElements, &listElements) != TCL_OK) { + return NsfVarErrMsg(interp, "forward: '", ForwardArgString, "' is not a valid list", (char *) NULL); } if (nrElements < 1 || nrElements > 2) { - return NsfVarErrMsg(interp, "forward: '", forwardArgString, + return NsfVarErrMsg(interp, "forward: '", ForwardArgString, "' must contain 1 or 2 arguments", (char *) NULL); } @@ -9203,7 +9227,7 @@ for (i = 1; i < firstPosArg; i++) { if (strcmp(firstElementString, ObjStr(objv[i])) == 0) { - /*fprintf(stderr, "We have a MATCH for '%s' oldInputArg %d\n", forwardArgString, *inputArg);*/ + /*fprintf(stderr, "We have a MATCH for '%s' oldInputArg %d\n", ForwardArgString, *inputArg);*/ *out = objv[i]; /* %1 will start at a different place. Proceed if necessary to firstPosArg */ if (*inputArg < firstPosArg) { @@ -9243,39 +9267,39 @@ } } - } else if (c == 'a' && !strncmp(forwardArgString, "argcl", 4)) { - if (Tcl_ListObjIndex(interp, forwardArgObj, 1, &list) != TCL_OK) { + } else if (c == 'a' && !strncmp(ForwardArgString, "argcl", 4)) { + if (Tcl_ListObjIndex(interp, ForwardArgObj, 1, &list) != TCL_OK) { return NsfVarErrMsg(interp, "forward: %argclindex must by a valid list, given: '", - forwardArgString, "'", (char *) NULL); + ForwardArgString, "'", (char *) NULL); } if (Tcl_ListObjGetElements(interp, list, &nrElements, &listElements) != TCL_OK) { return NsfVarErrMsg(interp, "forward: %argclindex contains invalid list '", ObjStr(list), "'", (char *) NULL); } if (nrArgs >= nrElements) { return NsfVarErrMsg(interp, "forward: not enough elements in specified list of ARGC argument ", - forwardArgString, (char *) NULL); + ForwardArgString, (char *) NULL); } *out = listElements[nrArgs]; } else if (c == '%') { - Tcl_Obj *newarg = Tcl_NewStringObj(forwardArgString, -1); + Tcl_Obj *newarg = Tcl_NewStringObj(ForwardArgString, -1); *out = newarg; goto add_to_freelist; } else { /* evaluating given command */ int result; - /*fprintf(stderr, "evaluating '%s'\n", forwardArgString);*/ - if ((result = Tcl_EvalEx(interp, forwardArgString, -1, 0)) != TCL_OK) + /*fprintf(stderr, "evaluating '%s'\n", ForwardArgString);*/ + if ((result = Tcl_EvalEx(interp, ForwardArgString, -1, 0)) != TCL_OK) return result; *out = Tcl_DuplicateObj(Tcl_GetObjResult(interp)); /*fprintf(stderr, "result = '%s'\n", ObjStr(*out));*/ goto add_to_freelist; } } else { - if (p == forwardArgString) - *out = forwardArgObj; + if (p == ForwardArgString) + *out = ForwardArgObj; else { - Tcl_Obj *newarg = Tcl_NewStringObj(forwardArgString, -1); + Tcl_Obj *newarg = Tcl_NewStringObj(ForwardArgString, -1); *out = newarg; goto add_to_freelist; } @@ -9293,7 +9317,7 @@ static int -callForwarder(ForwardCmdClientData *tcd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { +CallForwarder(ForwardCmdClientData *tcd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { ClientData clientData; int result; NsfObject *object = tcd->object; @@ -9317,7 +9341,7 @@ /*fprintf(stderr, "Nsf object %s, objc=%d\n", ObjStr(tcd->cmdName), objc);*/ result = NsfObjDispatch(clientData, interp, objc, objv); } else { - /*fprintf(stderr, "callForwarder: no nsf object %s\n", ObjStr(tcd->cmdName));*/ + /*fprintf(stderr, "CallForwarder: no nsf object %s\n", ObjStr(tcd->cmdName));*/ result = Tcl_EvalObjv(interp, objc, objv, 0); } @@ -9346,14 +9370,14 @@ if (tcd->passthrough) { /* two short cuts for simple cases */ /* early binding, cmd *resolved, we have to care only for objscope */ - return callForwarder(tcd, interp, objc, objv); + return CallForwarder(tcd, interp, objc, objv); } else if (!tcd->args && *(ObjStr(tcd->cmdName)) != '%') { /* we have ony to replace the method name with the given cmd name */ ALLOC_ON_STACK(Tcl_Obj*, objc, ov); /*fprintf(stderr, "+++ forwardMethod must subst \n");*/ memcpy(ov, objv, sizeof(Tcl_Obj *)*objc); ov[0] = tcd->cmdName; - result = callForwarder(tcd, interp, objc, ov); + result = CallForwarder(tcd, interp, objc, ov); FREE_ON_STACK(Tcl_Obj *, ov); return result; } else { @@ -9369,7 +9393,7 @@ } /* the first argument is always the command, to which we forward */ - if ((result = forwardArg(interp, objc, objv, tcd->cmdName, tcd, + if ((result = ForwardArg(interp, objc, objv, tcd->cmdName, tcd, &ov[outputArg], &freeList, &inputArg, &objvmap[outputArg], firstPosArg, &outputincr)) != TCL_OK) { @@ -9396,7 +9420,7 @@ Tcl_ListObjGetElements(interp, tcd->args, &nrElements, &listElements); for (j=0; jcmdName; - result = callForwarder(tcd, interp, objc, ov); + result = CallForwarder(tcd, interp, objc, ov); if (tcd->prefix) {DECR_REF_COUNT(ov[1]);} exitforwardmethod: @@ -9547,7 +9571,8 @@ return result; } -static void setterCmdDeleteProc(ClientData clientData) { +static void +SetterCmdDeleteProc(ClientData clientData) { SetterCmdClientData *setterClientData = (SetterCmdClientData *)clientData; if (setterClientData->paramsPtr) { @@ -9556,7 +9581,8 @@ FREE(SetterCmdClientData, setterClientData); } -static void aliasCmdDeleteProc(ClientData clientData) { +static void +AliasCmdDeleteProc(ClientData clientData) { AliasCmdClientData *tcd = (AliasCmdClientData *)clientData; ImportRef *refPtr, *prevPtr = NULL; @@ -9573,7 +9599,7 @@ AliasDelete(tcd->interp, tcd->cmdName, methodName, tcd->class == NULL); } - /*fprintf(stderr, "aliasCmdDeleteProc\n");*/ + /*fprintf(stderr, "AliasCmdDeleteProc\n");*/ if (tcd->cmdName) {DECR_REF_COUNT(tcd->cmdName);} if (tcd->aliasedCmd) { Command *aliasedCmd = (Command *)(tcd->aliasedCmd); @@ -9605,7 +9631,7 @@ typedef enum {NO_DASH, SKALAR_DASH, LIST_DASH} dashArgType; static dashArgType -isDashArg(Tcl_Interp *interp, Tcl_Obj *obj, int firstArg, CONST char **methodName, int *objc, Tcl_Obj **objv[]) { +IsDashArg(Tcl_Interp *interp, Tcl_Obj *obj, int firstArg, CONST char **methodName, int *objc, Tcl_Obj **objv[]) { CONST char *flag; assert(obj); @@ -9642,12 +9668,12 @@ } static int -callConfigureMethod(Tcl_Interp *interp, NsfObject *object, CONST char *methodName, +CallConfigureMethod(Tcl_Interp *interp, NsfObject *object, CONST char *methodName, int argc, Tcl_Obj *CONST argv[]) { int result; Tcl_Obj *methodObj = Tcl_NewStringObj(methodName, -1); - /* fprintf(stderr, "callConfigureMethod method %s->'%s' level %d, argc %d\n", + /* fprintf(stderr, "CallConfigureMethod method %s->'%s' level %d, argc %d\n", objectName(object), methodName, level, argc);*/ if (isInitString(methodName)) { @@ -9656,7 +9682,7 @@ Tcl_ResetResult(interp); INCR_REF_COUNT(methodObj); - result = callMethod((ClientData)object, interp, methodObj, argc, argv, NSF_CM_NO_UNKNOWN); + result = CallMethod((ClientData)object, interp, methodObj, argc, argv, NSF_CM_NO_UNKNOWN); DECR_REF_COUNT(methodObj); /*fprintf(stderr, "method '%s' called args: %d o=%p, result=%d %d\n", @@ -9678,7 +9704,8 @@ * class method implementations */ -static int isRootNamespace(Tcl_Interp *interp, Tcl_Namespace *nsPtr) { +static int +IsRootNamespace(Tcl_Interp *interp, Tcl_Namespace *nsPtr) { NsfObjectSystem *osPtr; for (osPtr = RUNTIME_STATE(interp)->objectSystems; osPtr; osPtr = osPtr->nextPtr) { @@ -9708,7 +9735,7 @@ framePtr; framePtr = Tcl_CallFrame_callerVarPtr(framePtr)) { nsPtr = Tcl_CallFrame_nsPtr(framePtr); - if (isRootNamespace(interp, nsPtr)) { + if (IsRootNamespace(interp, nsPtr)) { /*fprintf(stderr, "... %p skip %s\n", framePtr, nsPtr->fullName);*/ continue; } @@ -9742,7 +9769,7 @@ return TCL_ERROR; } -static int +static int ArgumentCheckHelper(Tcl_Interp *interp, Tcl_Obj *objPtr, struct NsfParam CONST *pPtr, int *flags, ClientData *clientData, Tcl_Obj **outObjPtr) { int objc, i, result; @@ -9764,7 +9791,7 @@ const char *valueString = ObjStr(ov[i]); if (pPtr->flags & NSF_ARG_ALLOW_EMPTY && *valueString == '\0') { - result = convertToString(interp, ov[i], pPtr, clientData, &elementObjPtr); + result = ConvertToString(interp, ov[i], pPtr, clientData, &elementObjPtr); } else { result = (*pPtr->converter)(interp, ov[i], pPtr, clientData, &elementObjPtr); } @@ -9827,7 +9854,7 @@ const char *valueString = ObjStr(ov[i]); if (pPtr->flags & NSF_ARG_ALLOW_EMPTY && *valueString == '\0') { - result = convertToString(interp, ov[i], pPtr, clientData, &elementObjPtr); + result = ConvertToString(interp, ov[i], pPtr, clientData, &elementObjPtr); } else { result = (*pPtr->converter)(interp, ov[i], pPtr, clientData, &elementObjPtr); } @@ -9857,7 +9884,7 @@ } else { const char *valueString = ObjStr(objPtr); if (pPtr->flags & NSF_ARG_ALLOW_EMPTY && *valueString == '\0') { - result = convertToString(interp, objPtr, pPtr, clientData, outObjPtr); + result = ConvertToString(interp, objPtr, pPtr, clientData, outObjPtr); } else { result = (*pPtr->converter)(interp, objPtr, pPtr, clientData, outObjPtr); } @@ -9866,7 +9893,7 @@ } static int -ArgumentDefaults(parseContext *pcPtr, Tcl_Interp *interp, +ArgumentDefaults(ParseContext *pcPtr, Tcl_Interp *interp, NsfParam CONST *ifd, int nrParams) { NsfParam CONST *pPtr; int i; @@ -9880,7 +9907,7 @@ if (pcPtr->objv[i]) { /* we got an actual value, which was already checked by objv parser */ /*fprintf(stderr, "setting passed value for %s to '%s'\n", pPtr->name, ObjStr(pcPtr->objv[i]));*/ - if (pPtr->converter == convertToSwitch) { + if (pPtr->converter == ConvertToSwitch) { int bool; Tcl_GetBooleanFromObj(interp, pPtr->defaultValue, &bool); pcPtr->objv[i] = Tcl_NewBooleanObj(!bool); @@ -9903,7 +9930,7 @@ pPtr->defaultValue, ObjStr(pPtr->defaultValue), newValue, ObjStr(newValue));*/ - /* the according DECR is performed by parseContextRelease() */ + /* the according DECR is performed by ParseContextRelease() */ INCR_REF_COUNT(newValue); mustDecrNewValue = 1; pcPtr->flags[i] |= NSF_PC_MUST_DECR; @@ -9956,7 +9983,7 @@ * returned to the Tcl level level; this value is * unset later by unsetUnknownArgs */ - pcPtr->objv[i] = NsfGlobalObjs[XOTE___UNKNOWN__]; + pcPtr->objv[i] = NsfGlobalObjs[NSF___UNKNOWN__]; } } } @@ -9967,11 +9994,11 @@ ArgumentParse(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], NsfObject *object, Tcl_Obj *procNameObj, NsfParam CONST *paramPtr, int nrParams, int doCheck, - parseContext *pcPtr) { + ParseContext *pcPtr) { int i, o, flagCount, nrReq = 0, nrOpt = 0, dashdash = 0, nrDashdash = 0; NsfParam CONST *pPtr; - parseContextInit(pcPtr, nrParams, object, procNameObj); + ParseContextInit(pcPtr, nrParams, object, procNameObj); #if defined(PARSE_TRACE) fprintf(stderr, "BEGIN (%d) [0]%s ", objc, ObjStr(procNameObj)); @@ -10011,7 +10038,7 @@ if (nppPtr->flags & NSF_ARG_REQUIRED) nrReq++; else nrOpt++; if (nppPtr->nrArgs == 0) { pcPtr->clientData[j] = (ClientData)1; /* the flag was given */ - pcPtr->objv[j] = NsfGlobalObjs[XOTE_ONE]; + pcPtr->objv[j] = NsfGlobalObjs[NSF_ONE]; } else { /* we assume for now, nrArgs is at most 1 */ o++; p++; @@ -10078,9 +10105,9 @@ if (dashdash) {dashdash = 0;} if (pPtr->flags & NSF_ARG_REQUIRED) nrReq++; else nrOpt++; - /*fprintf(stderr, "... arg %s req %d converter %p try to set on %d: '%s' convertViaCmd %p\n", + /*fprintf(stderr, "... arg %s req %d converter %p try to set on %d: '%s' ConvertViaCmd %p\n", pPtr->name, pPtr->flags & NSF_ARG_REQUIRED, pPtr->converter, i, ObjStr(objv[o]), - convertViaCmd);*/ + ConvertViaCmd);*/ if (ArgumentCheck(interp, objv[o], pPtr, doCheck, &pcPtr->flags[i], &pcPtr->clientData[i], &pcPtr->objv[i]) != TCL_OK) { @@ -10110,7 +10137,7 @@ /* is last argument a vararg? */ pPtr--; - if (pPtr->converter == convertToNothing) { + if (pPtr->converter == ConvertToNothing) { pcPtr->varArgs = 1; /*fprintf(stderr, "last arg of proc '%s' is varargs\n", ObjStr(procNameObj));*/ } @@ -10135,7 +10162,7 @@ ListVarKeys(Tcl_Interp *interp, Tcl_HashTable *tablePtr, CONST char *pattern) { Tcl_HashEntry *hPtr; - if (pattern && noMetaChars(pattern)) { + if (pattern && NoMetaChars(pattern)) { Tcl_Obj *patternObj = Tcl_NewStringObj(pattern, -1); INCR_REF_COUNT(patternObj); @@ -10144,7 +10171,7 @@ Var *val = VarHashGetValue(hPtr); Tcl_SetObjResult(interp, VarHashGetKey(val)); } else { - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); } DECR_REF_COUNT(patternObj); } else { @@ -10175,7 +10202,7 @@ cmd = importedCmd; } /* dereference the Next Scripting alias chain */ - if (Tcl_Command_deleteProc(cmd) == aliasCmdDeleteProc) { + if (Tcl_Command_deleteProc(cmd) == AliasCmdDeleteProc) { AliasCmdClientData *tcd = (AliasCmdClientData *)Tcl_Command_objClientData(cmd); cmd = tcd->aliasedCmd; continue; @@ -10195,7 +10222,7 @@ return NsfErrBadVal(interp, "info body", "a tcl method name", methodName); } -static Tcl_Obj* +static Tcl_Obj * ListParamDefs(Tcl_Interp *interp, NsfParam CONST *paramsPtr, int style) { Tcl_Obj *listObj; @@ -10344,7 +10371,7 @@ objectName(object), methodName, cmd, subcmd, withPer_object);*/ if (!cmd) { - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); } else { Tcl_ObjCmdProc *procPtr = Tcl_Command_objProc(cmd); int outputPerObject = 0; @@ -10458,8 +10485,8 @@ NsfAssertionStore *assertions; resultObj = Tcl_NewListObj(0, NULL); - /* todo: don't hard-code registering command name "method" / XOTE_METHOD */ - AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[XOTE_METHOD], + /* todo: don't hard-code registering command name "method" / NSF_METHOD */ + AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[NSF_METHOD], object, methodName, cmd, 0, outputPerObject); ListCmdParams(interp, cmd, methodName, 0); Tcl_ListObjAppendElement(interp, resultObj, Tcl_GetObjResult(interp)); @@ -10490,16 +10517,16 @@ /* forwarder */ switch (subcmd) { case InfomethodsubcmdTypeIdx: - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_FORWARD]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_FORWARD]); break; case InfomethodsubcmdDefinitionIdx: { ClientData clientData = cmd ? Tcl_Command_objClientData(cmd) : NULL; if (clientData) { resultObj = Tcl_NewListObj(0, NULL); - /* todo: don't hard-code registering command name "forward" / XOTE_FORWARD*/ - AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[XOTE_FORWARD], + /* todo: don't hard-code registering command name "forward" / NSF_FORWARD*/ + AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[NSF_FORWARD], object, methodName, cmd, 0, outputPerObject); AppendForwardDefinition(interp, resultObj, clientData); Tcl_SetObjResult(interp, resultObj); @@ -10512,15 +10539,15 @@ /* setter methods */ switch (subcmd) { case InfomethodsubcmdTypeIdx: - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_SETTER]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_SETTER]); break; case InfomethodsubcmdDefinitionIdx: { SetterCmdClientData *cd = (SetterCmdClientData *)Tcl_Command_objClientData(cmd); resultObj = Tcl_NewListObj(0, NULL); - /* todo: don't hard-code registering command name "setter" / XOTE_SETTER */ + /* todo: don't hard-code registering command name "setter" / NSF_SETTER */ - AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[XOTE_SETTER], object, + AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[NSF_SETTER], object, cd->paramsPtr ? ObjStr(cd->paramsPtr->paramObj) : methodName, cmd, 0, outputPerObject); Tcl_SetObjResult(interp, resultObj); @@ -10541,7 +10568,7 @@ break; case InfomethodsubcmdDefinitionIdx: { - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); break; } } @@ -10564,16 +10591,16 @@ /* is an alias */ switch (subcmd) { case InfomethodsubcmdTypeIdx: - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_ALIAS]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_ALIAS]); break; case InfomethodsubcmdDefinitionIdx: { int nrElements; Tcl_Obj **listElements; resultObj = Tcl_NewListObj(0, NULL); Tcl_ListObjGetElements(interp, entryObj, &nrElements, &listElements); - /* todo: don't hard-code registering command name "alias" / XOTE_ALIAS */ - AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[XOTE_ALIAS], + /* todo: don't hard-code registering command name "alias" / NSF_ALIAS */ + AppendMethodRegistration(interp, resultObj, NsfGlobalStrings[NSF_ALIAS], object, methodName, cmd, nrElements!=1, outputPerObject); Tcl_ListObjAppendElement(interp, resultObj, listElements[nrElements-1]); Tcl_SetObjResult(interp, resultObj); @@ -10583,14 +10610,13 @@ } else { /* check, to be on the safe side */ if (procPtr == NsfObjDispatch) { - /* is an object */ + /* the command is an object */ switch (subcmd) { case InfomethodsubcmdTypeIdx: Tcl_SetObjResult(interp, Tcl_NewStringObj("object", -1)); break; case InfomethodsubcmdDefinitionIdx: { - /* yyyy */ NsfObject *subObject = NsfGetObjectFromCmdPtr(cmd); assert(subObject); resultObj = Tcl_NewListObj(0, NULL); @@ -10685,7 +10711,7 @@ char *key; int new; - if (pattern && noMetaChars(pattern)) { + if (pattern && NoMetaChars(pattern)) { /* We have a pattern that can be used for direct lookup; * no need to iterate */ @@ -10744,15 +10770,15 @@ if (!object->nsPtr) return TCL_OK; cmdTable = Tcl_Namespace_cmdTable(object->nsPtr); - if (pattern && noMetaChars(pattern)) { + if (pattern && NoMetaChars(pattern)) { if ((childObject = GetObjectFromString(interp, pattern)) && (!classesOnly || NsfObjectIsClass(childObject)) && (Tcl_Command_nsPtr(childObject->id) == object->nsPtr) /* true children */ ) { Tcl_SetObjResult(interp, childObject->cmdName); } else { - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); } } else { @@ -10898,8 +10924,8 @@ int rc; if (pattern && - convertToObjpattern(interp, pattern, NULL, (ClientData *)&patternObj, &outObjPtr) == TCL_OK) { - if (getMatchObject(interp, patternObj, pattern, &matchObject, &patternString) == -1) { + ConvertToObjpattern(interp, pattern, NULL, (ClientData *)&patternObj, &outObjPtr) == TCL_OK) { + if (GetMatchObject(interp, patternObj, pattern, &matchObject, &patternString) == -1) { if (patternObj) { DECR_REF_COUNT(patternObj); } @@ -10918,7 +10944,7 @@ } if (matchObject) { - Tcl_SetObjResult(interp, rc ? matchObject->cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, rc ? matchObject->cmdName : NsfGlobalObjs[NSF_EMPTY]); } if (patternObj) { @@ -10932,7 +10958,8 @@ * End result setting commands ********************************/ -static CONST char* AliasIndex(Tcl_DString *dsPtr, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object) { +static CONST char * +AliasIndex(Tcl_DString *dsPtr, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object) { Tcl_DStringInit(dsPtr); Tcl_DStringAppend(dsPtr, ObjStr(cmdName), -1); Tcl_DStringAppend(dsPtr, ",", 1); @@ -10946,10 +10973,11 @@ return Tcl_DStringValue(dsPtr); } -static int AliasAdd(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object, - CONST char *cmd) { +static int +AliasAdd(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object, + CONST char *cmd) { Tcl_DString ds, *dsPtr = &ds; - Tcl_SetVar2Ex(interp, NsfGlobalStrings[XOTE_ALIAS_ARRAY], + Tcl_SetVar2Ex(interp, NsfGlobalStrings[NSF_ALIAS_ARRAY], AliasIndex(dsPtr, cmdName, methodName, withPer_object), Tcl_NewStringObj(cmd, -1), TCL_GLOBAL_ONLY); @@ -10959,9 +10987,10 @@ return TCL_OK; } -static int AliasDelete(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object) { +static int +AliasDelete(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object) { Tcl_DString ds, *dsPtr = &ds; - int result = Tcl_UnsetVar2(interp, NsfGlobalStrings[XOTE_ALIAS_ARRAY], + int result = Tcl_UnsetVar2(interp, NsfGlobalStrings[NSF_ALIAS_ARRAY], AliasIndex(dsPtr, cmdName, methodName, withPer_object), TCL_GLOBAL_ONLY); /*fprintf(stderr, "aliasDelete ::nsf::alias(%s) returned %d (%d)\n", @@ -10970,9 +10999,10 @@ return result; } -static Tcl_Obj *AliasGet(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object) { +static Tcl_Obj * +AliasGet(Tcl_Interp *interp, Tcl_Obj *cmdName, CONST char *methodName, int withPer_object) { Tcl_DString ds, *dsPtr = &ds; - Tcl_Obj *obj = Tcl_GetVar2Ex(interp, NsfGlobalStrings[XOTE_ALIAS_ARRAY], + Tcl_Obj *obj = Tcl_GetVar2Ex(interp, NsfGlobalStrings[NSF_ALIAS_ARRAY], AliasIndex(dsPtr, cmdName, methodName, withPer_object), TCL_GLOBAL_ONLY); /*fprintf(stderr, "aliasGet returns %p\n", object);*/ @@ -10994,7 +11024,8 @@ {-argName "cmdName" -required 1 -type tclobj} } */ -static int NsfAliasCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, +static int +NsfAliasCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, CONST char *methodName, int withNonleaf, int withObjscope, Tcl_Obj *cmdName) { Tcl_ObjCmdProc *objProc, *newObjProc = NULL; @@ -11075,7 +11106,7 @@ tcd->aliasedCmd = cmd; tcd->clientData = Tcl_Command_objClientData(cmd); objProc = newObjProc; - deleteProc = aliasCmdDeleteProc; + deleteProc = AliasCmdDeleteProc; if (tcd->cmdName) {INCR_REF_COUNT(tcd->cmdName);} } else { /* call the command directly (must be a c-implemented command not @@ -11146,7 +11177,8 @@ be applied on the sketched method already. */ -static int NsfAssertionCmd(Tcl_Interp *interp, NsfObject *object, int subcmd, Tcl_Obj *arg) { +static int +NsfAssertionCmd(Tcl_Interp *interp, NsfObject *object, int subcmd, Tcl_Obj *arg) { NsfClass *class; switch (subcmd) { @@ -11189,7 +11221,8 @@ {-argName "value" -required 0 -type tclobj} } */ -static int NsfConfigureCmd(Tcl_Interp *interp, int configureoption, Tcl_Obj *valueObj) { +static int +NsfConfigureCmd(Tcl_Interp *interp, int configureoption, Tcl_Obj *valueObj) { int bool; if (configureoption == ConfigureoptionObjectsystemsIdx) { @@ -11474,7 +11507,8 @@ {-argName "args" -type allargs} } */ -static int NsfColonCmd(Tcl_Interp *interp, int nobjc, Tcl_Obj *CONST nobjv[]) { +static int +NsfColonCmd(Tcl_Interp *interp, int nobjc, Tcl_Obj *CONST nobjv[]) { NsfObject *self = GetSelfObj(interp); if (!self) { return NsfVarErrMsg(interp, "Cannot resolve 'self', probably called outside the context of an Next Scripting Object", @@ -11491,11 +11525,12 @@ {-argName "var" -required 1} } */ -static int NsfExistsVarCmd(Tcl_Interp *interp, NsfObject *object, CONST char *varName) { +static int +NsfExistsVarCmd(Tcl_Interp *interp, NsfObject *object, CONST char *varName) { if (CheckVarName(interp, varName) != TCL_OK) { return TCL_ERROR; } - Tcl_SetIntObj(Tcl_GetObjResult(interp), varExists(interp, object, varName, NULL, 1, 1)); + Tcl_SetIntObj(Tcl_GetObjResult(interp), VarExists(interp, object, varName, NULL, 1, 1)); return TCL_OK; } @@ -11554,16 +11589,17 @@ {-argName "args" -type args} } */ -static int NsfForwardCmd(Tcl_Interp *interp, - NsfObject *object, int withPer_object, - Tcl_Obj *methodObj, - Tcl_Obj *withDefault, int withEarlybinding, Tcl_Obj *withMethodprefix, - int withObjscope, Tcl_Obj *withOnerror, int withVerbose, - Tcl_Obj *target, int nobjc, Tcl_Obj *CONST nobjv[]) { +static int +NsfForwardCmd(Tcl_Interp *interp, + NsfObject *object, int withPer_object, + Tcl_Obj *methodObj, + Tcl_Obj *withDefault, int withEarlybinding, Tcl_Obj *withMethodprefix, + int withObjscope, Tcl_Obj *withOnerror, int withVerbose, + Tcl_Obj *target, int nobjc, Tcl_Obj *CONST nobjv[]) { ForwardCmdClientData *tcd = NULL; int result; - result = forwardProcessOptions(interp, methodObj, + result = ForwardProcessOptions(interp, methodObj, withDefault, withEarlybinding, withMethodprefix, withObjscope, withOnerror, withVerbose, target, nobjc, nobjv, &tcd); @@ -11577,19 +11613,19 @@ if (cl == NULL) { result = NsfAddObjectMethod(interp, (Nsf_Object *)object, methodName, (Tcl_ObjCmdProc*)NsfForwardMethod, - (ClientData)tcd, forwardCmdDeleteProc, 0); + (ClientData)tcd, ForwardCmdDeleteProc, 0); } else { - result = NsfAddClassMethod(interp, (Nsf_Class*)cl, methodName, + result = NsfAddClassMethod(interp, (Nsf_Class *)cl, methodName, (Tcl_ObjCmdProc*)NsfForwardMethod, - (ClientData)tcd, forwardCmdDeleteProc, 0); + (ClientData)tcd, ForwardCmdDeleteProc, 0); } if (result == TCL_OK) { result = ListMethodHandle(interp, object, cl == NULL, methodName); } } if (result != TCL_OK) { - forwardCmdDeleteProc((ClientData)tcd); + ForwardCmdDeleteProc((ClientData)tcd); } return result; } @@ -11645,7 +11681,7 @@ Tcl_Interp *slave; /* create a fresh Tcl interpreter, or pass command to an existing one */ - if (NsfCallCommand(interp, XOTE_INTERP, objc, objv) != TCL_OK) { + if (NsfCallCommand(interp, NSF_INTERP, objc, objv) != TCL_OK) { return TCL_ERROR; } @@ -11673,7 +11709,8 @@ {-argName "class" -type class} } */ -static int NsfInvalidateObjectParameterCmd(Tcl_Interp *interp, NsfClass *cl) { +static int +NsfInvalidateObjectParameterCmd(Tcl_Interp *interp, NsfClass *cl) { if (cl->parsedParamPtr) { /*fprintf(stderr, " %s invalidate %p\n", className(cl), cl->parsedParamPtr);*/ ParsedParamFree(cl->parsedParamPtr); @@ -11689,7 +11726,8 @@ {-argName "value" -required 1 -type tclobj} } */ -static int NsfIsCmd(Tcl_Interp *interp, int withComplain, Tcl_Obj *constraintObj, Tcl_Obj *valueObj) { +static int +NsfIsCmd(Tcl_Interp *interp, int withComplain, Tcl_Obj *constraintObj, Tcl_Obj *valueObj) { NsfParam *paramPtr = NULL; int result; @@ -11703,7 +11741,7 @@ return TCL_ERROR; } - if (paramPtr->converter == convertViaCmd + if (paramPtr->converter == ConvertViaCmd && (withComplain == 0 || result == TCL_OK)) { Tcl_ResetResult(interp); } @@ -11723,7 +11761,8 @@ {-argName "object" -required 1 -type tclobj} } */ -static int NsfIsObjectCmd(Tcl_Interp *interp, Tcl_Obj *valueObj) { +static int +NsfIsObjectCmd(Tcl_Interp *interp, Tcl_Obj *valueObj) { NsfObject *object; Tcl_SetBooleanObj(Tcl_GetObjResult(interp), GetObjectFromObj(interp, valueObj, &object) == TCL_OK); return TCL_OK; @@ -11743,16 +11782,17 @@ {-argName "-postcondition" -nrargs 1 -type tclobj} } */ -static int NsfMethodCmd(Tcl_Interp *interp, NsfObject *object, - int withInner_namespace, int withPer_object, int withPublic, - Tcl_Obj *nameObj, Tcl_Obj *args, Tcl_Obj *body, - Tcl_Obj *withPrecondition, Tcl_Obj *withPostcondition) { +static int +NsfMethodCmd(Tcl_Interp *interp, NsfObject *object, + int withInner_namespace, int withPer_object, int withPublic, + Tcl_Obj *nameObj, Tcl_Obj *args, Tcl_Obj *body, + Tcl_Obj *withPrecondition, Tcl_Obj *withPostcondition) { NsfClass *cl = (withPer_object || ! NsfObjectIsClass(object)) ? NULL : (NsfClass *)object; if (cl == 0) { - requireObjNamespace(interp, object); + RequireObjNamespace(interp, object); } return MakeMethod(interp, object, cl, nameObj, args, body, withPrecondition, withPostcondition, @@ -11768,8 +11808,9 @@ {-argName "value" -type tclobj} } */ -static int NsfMethodPropertyCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, - Tcl_Obj *methodObj, int methodproperty, Tcl_Obj *valueObj) { +static int +NsfMethodPropertyCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, + Tcl_Obj *methodObj, int methodproperty, Tcl_Obj *valueObj) { CONST char *methodName = ObjStr(methodObj); Tcl_Command cmd = NULL; @@ -11859,7 +11900,7 @@ objPtr = methodproperty == MethodpropertySlotobjIdx ? ¶mDefs->slotObj : ¶mDefs->returns; if (valueObj == NULL) { /* must be a returns query */ - Tcl_SetObjResult(interp, *objPtr ? *objPtr : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, *objPtr ? *objPtr : NsfGlobalObjs[NSF_EMPTY]); } else { const char *valueString = ObjStr(valueObj); /* Set a new value; if there is already a value, free it */ @@ -11888,7 +11929,8 @@ {-argName "args" -type args} } */ -static int NsfMyCmd(Tcl_Interp *interp, int withLocal, Tcl_Obj *methodObj, int nobjc, Tcl_Obj *CONST nobjv[]) { +static int +NsfMyCmd(Tcl_Interp *interp, int withLocal, Tcl_Obj *methodObj, int nobjc, Tcl_Obj *CONST nobjv[]) { NsfObject *self = GetSelfObj(interp); int result; @@ -11910,7 +11952,7 @@ result = MethodDispatch((ClientData)self, interp, nobjc+2, nobjv, cmd, self, cl, methodName, 0); } else { - result = callMethod((ClientData)self, interp, methodObj, nobjc+2, nobjv, 0); + result = CallMethod((ClientData)self, interp, methodObj, nobjc+2, nobjv, 0); } return result; } @@ -11921,7 +11963,8 @@ {-argName "toNs" -required 1 -type tclobj} } */ -static int NsfNSCopyCmds(Tcl_Interp *interp, Tcl_Obj *fromNs, Tcl_Obj *toNs) { +static int +NsfNSCopyCmds(Tcl_Interp *interp, Tcl_Obj *fromNs, Tcl_Obj *toNs) { Tcl_Command cmd; Tcl_Obj *newFullCmdName, *oldFullCmdName; CONST char *newName, *oldName, *name; @@ -12171,7 +12214,7 @@ hPtr = varTable ? Tcl_FirstHashEntry(VarHashTable(varTable), &hSrch) : NULL; while (hPtr) { - getVarAndNameFromHash(hPtr, &varPtr, &varNameObj); + GetVarAndNameFromHash(hPtr, &varPtr, &varNameObj); INCR_REF_COUNT(varNameObj); if (!TclIsVarUndefined(varPtr) && !TclIsVarLink(varPtr)) { @@ -12201,7 +12244,7 @@ Tcl_Obj *eltNameObj; Var *eltVar; - getVarAndNameFromHash(ahPtr, &eltVar, &eltNameObj); + GetVarAndNameFromHash(ahPtr, &eltVar, &eltNameObj); INCR_REF_COUNT(eltNameObj); if (TclIsVarScalar(eltVar)) { @@ -12234,7 +12277,8 @@ {-argName "name" -required 1 -type tclobj} } */ -static int NsfQualifyObjCmd(Tcl_Interp *interp, Tcl_Obj *nameObj) { +static int +NsfQualifyObjCmd(Tcl_Interp *interp, Tcl_Obj *nameObj) { CONST char *nameString = ObjStr(nameObj); if (isAbsolutePath(nameString)) { @@ -12252,8 +12296,9 @@ {-argName "value" -required 0 -type tclobj} } */ -static int NsfRelationCmd(Tcl_Interp *interp, NsfObject *object, - int relationtype, Tcl_Obj *valueObj) { +static int +NsfRelationCmd(Tcl_Interp *interp, NsfObject *object, + int relationtype, Tcl_Obj *valueObj) { int oc; Tcl_Obj **ov; NsfObject *nObject = NULL; NsfClass *cl = NULL; @@ -12490,7 +12535,8 @@ {-argName "currentoption" -required 0 -type "proc|method|object|class|activelevel|args|activemixin|calledproc|calledmethod|calledclass|callingproc|callingmethod|callingclass|callinglevel|callingobject|filterreg|isnextcall|next"} } */ -static int NsfCurrentCmd(Tcl_Interp *interp, int selfoption) { +static int +NsfCurrentCmd(Tcl_Interp *interp, int selfoption) { NsfObject *object = GetSelfObj(interp); NsfCallStackContent *cscPtr; int result = TCL_OK; @@ -12524,11 +12570,11 @@ case CurrentoptionClassIdx: /* class subcommand */ cscPtr = CallStackGetTopFrame(interp, NULL); - Tcl_SetObjResult(interp, cscPtr->cl ? cscPtr->cl->object.cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, cscPtr->cl ? cscPtr->cl->object.cmdName : NsfGlobalObjs[NSF_EMPTY]); break; case CurrentoptionActivelevelIdx: - Tcl_SetObjResult(interp, computeLevelObj(interp, ACTIVE_LEVEL)); + Tcl_SetObjResult(interp, ComputeLevelObj(interp, ACTIVE_LEVEL)); break; case CurrentoptionArgsIdx: { @@ -12553,7 +12599,7 @@ if (RUNTIME_STATE(interp)->cmdPtr) { object = NsfGetObjectFromCmdPtr(RUNTIME_STATE(interp)->cmdPtr); } - Tcl_SetObjResult(interp, object ? object->cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, object ? object->cmdName : NsfGlobalObjs[NSF_EMPTY]); break; } @@ -12582,20 +12628,20 @@ case CurrentoptionCallingclassIdx: cscPtr = NsfCallStackFindLastInvocation(interp, 1, NULL); Tcl_SetObjResult(interp, cscPtr && cscPtr->cl ? cscPtr->cl->object.cmdName : - NsfGlobalObjs[XOTE_EMPTY]); + NsfGlobalObjs[NSF_EMPTY]); break; case CurrentoptionCallinglevelIdx: if (!object) { Tcl_SetIntObj(Tcl_GetObjResult(interp), 1); } else { - Tcl_SetObjResult(interp, computeLevelObj(interp, CALLING_LEVEL)); + Tcl_SetObjResult(interp, ComputeLevelObj(interp, CALLING_LEVEL)); } break; case CurrentoptionCallingobjectIdx: cscPtr = NsfCallStackFindLastInvocation(interp, 1, NULL); - Tcl_SetObjResult(interp, cscPtr ? cscPtr->self->cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, cscPtr ? cscPtr->self->cmdName : NsfGlobalObjs[NSF_EMPTY]); break; case CurrentoptionFilterregIdx: @@ -12635,7 +12681,8 @@ {-argName "value" -required 0 -type tclobj} } */ -static int NsfSetVarCmd(Tcl_Interp *interp, NsfObject *object, Tcl_Obj *variable, Tcl_Obj *valueObj) { +static int +NsfSetVarCmd(Tcl_Interp *interp, NsfObject *object, Tcl_Obj *variable, Tcl_Obj *valueObj) { if (CheckVarName(interp, ObjStr(variable)) != TCL_OK) { return TCL_ERROR; } @@ -12649,7 +12696,8 @@ {-argName "parameter" -type tclobj} } */ -static int NsfSetterCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, Tcl_Obj *parameter) { +static int +NsfSetterCmd(Tcl_Interp *interp, NsfObject *object, int withPer_object, Tcl_Obj *parameter) { NsfClass *cl = (withPer_object || ! NsfObjectIsClass(object)) ? NULL : (NsfClass *)object; CONST char *methodName = ObjStr(parameter); SetterCmdClientData *setterClientData; @@ -12681,7 +12729,7 @@ setterClientData->paramsPtr, &possibleUnknowns, &plainParams); if (result != TCL_OK) { - setterCmdDeleteProc((ClientData)setterClientData); + SetterCmdDeleteProc((ClientData)setterClientData); return result; } methodName = setterClientData->paramsPtr->name; @@ -12692,16 +12740,16 @@ if (cl) { result = NsfAddClassMethod(interp, (Nsf_Class *)cl, methodName, (Tcl_ObjCmdProc*)NsfSetterMethod, - (ClientData)setterClientData, setterCmdDeleteProc, 0); + (ClientData)setterClientData, SetterCmdDeleteProc, 0); } else { result = NsfAddObjectMethod(interp, (Nsf_Object *)object, methodName, (Tcl_ObjCmdProc*)NsfSetterMethod, - (ClientData)setterClientData, setterCmdDeleteProc, 0); + (ClientData)setterClientData, SetterCmdDeleteProc, 0); } if (result == TCL_OK) { result = ListMethodHandle(interp, object, cl == NULL, methodName); } else { - setterCmdDeleteProc((ClientData)setterClientData); + SetterCmdDeleteProc((ClientData)setterClientData); } return result; } @@ -12716,17 +12764,18 @@ static Tcl_FreeInternalRepProc ParamFreeInternalRep; static Tcl_UpdateStringProc ParamUpdateString; -static void ParamUpdateString(Tcl_Obj *objPtr) { +static void +ParamUpdateString(Tcl_Obj *objPtr) { Tcl_Panic("%s of type %s should not be called", "updateStringProc", objPtr->typePtr->name); } -static void ParamDupInteralRep(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) { +static void +ParamDupInteralRep(Tcl_Obj *srcPtr, Tcl_Obj *dupPtr) { Tcl_Panic("%s of type %s should not be called", "dupStringProc", srcPtr->typePtr->name); } -static int ParamSetFromAny(Tcl_Interp *interp, register Tcl_Obj *objPtr); static Tcl_ObjType paramObjType = { "nsfParam", /* name */ ParamFreeInternalRep, /* freeIntRepProc */ @@ -12802,7 +12851,8 @@ return ParamSetFromAny2(interp, "value:", objPtr); } -static int ParameterCheck(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *valueObj, +static int +ParameterCheck(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Obj *valueObj, const char *varNamePrefix, int doCheck, NsfParam **paramPtrPtr) { NsfParamWrapper *paramWrapperPtr; Tcl_Obj *outObjPtr = NULL; @@ -12861,7 +12911,8 @@ /*************************** * Begin Object Methods ***************************/ -static int NsfOAutonameMethod(Tcl_Interp *interp, NsfObject *object, int withInstance, int withReset, +static int +NsfOAutonameMethod(Tcl_Interp *interp, NsfObject *object, int withInstance, int withReset, Tcl_Obj *nameObj) { Tcl_Obj *autoname = AutonameIncr(interp, nameObj, object, withInstance, withReset); if (autoname) { @@ -12876,7 +12927,8 @@ return TCL_OK; } -static int NsfOCleanupMethod(Tcl_Interp *interp, NsfObject *object) { +static int +NsfOCleanupMethod(Tcl_Interp *interp, NsfObject *object) { NsfClass *cl = NsfObjectToClass(object); int softrecreate; Tcl_Obj *savedNameObj; @@ -12939,10 +12991,10 @@ * the the string representation. */ /*fprintf(stderr, "calling %s objectparameter\n", objectName(object));*/ - Tcl_Obj *methodObj = NsfMethodObj(interp, object, XO_o_objectparameter_idx); + Tcl_Obj *methodObj = NsfMethodObj(interp, object, NSF_o_objectparameter_idx); if (methodObj) { - result = callMethod((ClientData) object, interp, methodObj, + result = CallMethod((ClientData) object, interp, methodObj, 2, 0, NSF_CM_NO_PROTECT); if (result == TCL_OK) { @@ -12976,7 +13028,7 @@ NsfParam *paramPtr; NsfParamDefs *paramDefs; Tcl_Obj *newValue; - parseContext pc; + ParseContext pc; Tcl_CallFrame frame, *framePtr = &frame; #if 0 @@ -13005,7 +13057,7 @@ if (result != TCL_OK) { Nsf_PopFrameObj(interp, framePtr); - parseContextRelease(&pc); + ParseContextRelease(&pc); goto configure_exit; } @@ -13025,26 +13077,26 @@ ObjStr(paramPtr->nameObj), newValue, newValue ? ObjStr(newValue) : "(null)", paramPtr->type); */ - if (newValue == NsfGlobalObjs[XOTE___UNKNOWN__]) { + if (newValue == NsfGlobalObjs[NSF___UNKNOWN__]) { /* nothing to do here */ continue; } /* special setter due to relation handling */ - if (paramPtr->converter == convertToRelation) { + if (paramPtr->converter == ConvertToRelation) { ClientData relIdx; Tcl_Obj *relationObj = paramPtr->converterArg ? paramPtr->converterArg : paramPtr->nameObj, *outObjPtr; - result = convertToRelationtype(interp, relationObj, paramPtr, &relIdx, &outObjPtr); + result = ConvertToRelationtype(interp, relationObj, paramPtr, &relIdx, &outObjPtr); if (result == TCL_OK) { result = NsfRelationCmd(interp, object, PTR2INT(relIdx), newValue); } if (result != TCL_OK) { Nsf_PopFrameObj(interp, framePtr); - parseContextRelease(&pc); + ParseContextRelease(&pc); goto configure_exit; } /* done with relation handling */ @@ -13104,7 +13156,7 @@ if (result != TCL_OK) { Nsf_PopFrameObj(interp, framePtr); - parseContextRelease(&pc); + ParseContextRelease(&pc); goto configure_exit; } @@ -13136,29 +13188,30 @@ if (pc.varArgs && remainingArgsc > 0) { Tcl_Obj *methodObj; - if (CallDirectly(interp, object, XO_o_residualargs_idx, &methodObj)) { + if (CallDirectly(interp, object, NSF_o_residualargs_idx, &methodObj)) { i -= 2; if (methodObj) {pc.full_objv[i] = methodObj;} result = NsfOResidualargsMethod(interp, object, remainingArgsc+1, pc.full_objv + i); } else { - result = callMethod((ClientData) object, interp, + result = CallMethod((ClientData) object, interp, methodObj, remainingArgsc+2, pc.full_objv + i-1, 0); } if (result != TCL_OK) { - parseContextRelease(&pc); + ParseContextRelease(&pc); goto configure_exit; } } else { - Tcl_SetObjResult(interp, NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); } - parseContextRelease(&pc); + ParseContextRelease(&pc); configure_exit: return result; } -static int NsfODestroyMethod(Tcl_Interp *interp, NsfObject *object) { +static int +NsfODestroyMethod(Tcl_Interp *interp, NsfObject *object) { PRINTOBJ("NsfODestroyMethod", object); /*fprintf(stderr,"NsfODestroyMethod %p %s flags %.6x activation %d cmd %p cmd->flags %.6x\n", @@ -13183,7 +13236,7 @@ /*fprintf(stderr, " call dealloc on %p %s\n", object, ((Command*)object->id)->flags == 0 ? objectName(object) : "(deleted)");*/ - if (CallDirectly(interp, &object->cl->object, XO_c_dealloc_idx, &methodObj)) { + if (CallDirectly(interp, &object->cl->object, NSF_c_dealloc_idx, &methodObj)) { result = DoDealloc(interp, object); } else { /*fprintf(stderr, "call dealloc\n");*/ @@ -13209,19 +13262,21 @@ return TCL_OK; } -static int NsfOExistsMethod(Tcl_Interp *interp, NsfObject *object, CONST char *var) { - Tcl_SetIntObj(Tcl_GetObjResult(interp), varExists(interp, object, var, NULL, 1, 1)); +static int +NsfOExistsMethod(Tcl_Interp *interp, NsfObject *object, CONST char *var) { + Tcl_SetIntObj(Tcl_GetObjResult(interp), VarExists(interp, object, var, NULL, 1, 1)); return TCL_OK; } -static int NsfOFilterGuardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *filter, Tcl_Obj *guardObj) { +static int +NsfOFilterGuardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *filter, Tcl_Obj *guardObj) { NsfObjectOpt *opt = object->opt; if (opt && opt->filters) { NsfCmdList *h = CmdListFindNameInList(interp, filter, opt->filters); if (h) { if (h->clientData) - GuardDel((NsfCmdList*) h); + GuardDel((NsfCmdList *) h); GuardAdd(interp, h, guardObj); object->flags &= ~NSF_FILTER_ORDER_VALID; return TCL_OK; @@ -13236,7 +13291,8 @@ * Searches for filter on [self] and returns fully qualified name * if it is not found it returns an empty string */ -static int FilterSearchMethod(Tcl_Interp *interp, NsfObject *object, CONST char *filter) { +static int +FilterSearchMethod(Tcl_Interp *interp, NsfObject *object, CONST char *filter) { CONST char *filterName; NsfCmdList *cmdList; NsfClass *fcl; @@ -13261,7 +13317,8 @@ return ListMethodHandle(interp, (NsfObject*)fcl, !NsfObjectIsClass(&fcl->object), filterName); } -static int NsfOInstVarMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { +static int +NsfOInstVarMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { callFrameContext ctx = {0}; int result; @@ -13280,7 +13337,8 @@ return result; } -static int NsfOMixinGuardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *mixin, Tcl_Obj *guardObj) { +static int +NsfOMixinGuardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *mixin, Tcl_Obj *guardObj) { NsfObjectOpt *opt = object->opt; if (opt && opt->mixins) { @@ -13293,7 +13351,7 @@ NsfCmdList *h = CmdListFindCmdInList(mixinCmd, opt->mixins); if (h) { if (h->clientData) - GuardDel((NsfCmdList*) h); + GuardDel((NsfCmdList *) h); GuardAdd(interp, h, guardObj); object->flags &= ~NSF_MIXIN_ORDER_VALID; return TCL_OK; @@ -13307,7 +13365,8 @@ #if 0 /* method for calling e.g. $obj __next */ -static int NsfONextMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { +static int +NsfONextMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { NsfCallStackContent *cscPtr = CallStackGetObjectFrame(interp, object); CONST char *methodName; @@ -13320,25 +13379,28 @@ } #endif -static int NsfONoinitMethod(Tcl_Interp *interp, NsfObject *object) { +static int +NsfONoinitMethod(Tcl_Interp *interp, NsfObject *object) { object->flags |= NSF_INIT_CALLED; return TCL_OK; } -static int NsfORequireNamespaceMethod(Tcl_Interp *interp, NsfObject *object) { - requireObjNamespace(interp, object); +static int +NsfORequireNamespaceMethod(Tcl_Interp *interp, NsfObject *object) { + RequireObjNamespace(interp, object); return TCL_OK; } -static int NsfOResidualargsMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { +static int +NsfOResidualargsMethod(Tcl_Interp *interp, NsfObject *object, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj **argv, **nextArgv, *resultObj; int i, start = 1, argc, nextArgc, normalArgs, result = TCL_OK, isdasharg = NO_DASH; CONST char *methodName, *nextMethodName; /* find arguments without leading dash */ for (i=start; i < objc; i++) { - if ((isdasharg = isDashArg(interp, objv[i], 1, &methodName, &argc, &argv))) { + if ((isdasharg = IsDashArg(interp, objv[i], 1, &methodName, &argc, &argv))) { break; } } @@ -13350,11 +13412,11 @@ case SKALAR_DASH: /* Argument is a skalar with a leading dash */ { int j; for (j = i+1; j < objc; j++, argc++) { - if ((isdasharg = isDashArg(interp, objv[j], j==i+1, &nextMethodName, &nextArgc, &nextArgv))) { + if ((isdasharg = IsDashArg(interp, objv[j], j==i+1, &nextMethodName, &nextArgc, &nextArgv))) { break; } } - result = callConfigureMethod(interp, object, methodName, argc+1, objv+i+1); + result = CallConfigureMethod(interp, object, methodName, argc+1, objv+i+1); if (result != TCL_OK) { return result; } @@ -13364,9 +13426,9 @@ case LIST_DASH: /* Argument is a list with a leading dash, grouping determined by list */ { i++; if (icmdName; int result = TCL_ERROR; CONST char *fullName = ObjStr(objPtr); @@ -13521,7 +13586,8 @@ return result; } -static int NsfOVwaitMethod(Tcl_Interp *interp, NsfObject *object, CONST char *varname) { +static int +NsfOVwaitMethod(Tcl_Interp *interp, NsfObject *object, CONST char *varname) { int done, foundEvent; int flgs = TCL_TRACE_WRITES|TCL_TRACE_UNSETS; Tcl_CallFrame frame, *framePtr = &frame; @@ -13573,7 +13639,8 @@ * Begin Class Methods ***************************/ -static int NsfCAllocMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj) { +static int +NsfCAllocMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj) { Tcl_Obj *tmpName = NULL; CONST char *nameString = ObjStr(nameObj); int result; @@ -13698,10 +13765,10 @@ */ /* call recreate --> initialization */ - if (CallDirectly(interp, &cl->object, XO_c_recreate_idx, &methodObj)) { + if (CallDirectly(interp, &cl->object, NSF_c_recreate_idx, &methodObj)) { result = RecreateObject(interp, cl, newObject, objc, nobjv); } else { - result = callMethod((ClientData) cl, interp, methodObj, + result = CallMethod((ClientData) cl, interp, methodObj, objc+1, nobjv+1, NSF_CM_NO_PROTECT); } @@ -13710,7 +13777,7 @@ Tcl_SetObjResult(interp, newObject->cmdName); nameObj = newObject->cmdName; - objTrace("RECREATE", newObject); + ObjTrace("RECREATE", newObject); } else { /* @@ -13719,10 +13786,10 @@ */ /*fprintf(stderr, "alloc ... %s\n", ObjStr(nameObj));*/ - if (CallDirectly(interp, &cl->object, XO_c_alloc_idx, &methodObj)) { + if (CallDirectly(interp, &cl->object, NSF_c_alloc_idx, &methodObj)) { result = NsfCAllocMethod(interp, cl, nameObj); } else { - result = callMethod((ClientData) cl, interp, methodObj, + result = CallMethod((ClientData) cl, interp, methodObj, 3, &nameObj, 0); } if (result != TCL_OK) @@ -13738,11 +13805,11 @@ /*(void)RemoveInstance(newObject, newObject->cl);*/ /* TODO needed? remove? */ AddInstance(newObject, cl); - objTrace("CREATE", newObject); + ObjTrace("CREATE", newObject); /* in case, the object is destroyed during initialization, we incr refcount */ INCR_REF_COUNT(nameObj); - result = doObjInitialization(interp, newObject, objc, objv); + result = DoObjInitialization(interp, newObject, objc, objv); DECR_REF_COUNT(nameObj); } create_method_exit: @@ -13753,14 +13820,15 @@ return result; } -static int DoDealloc(Tcl_Interp *interp, NsfObject *object) { +static int +DoDealloc(Tcl_Interp *interp, NsfObject *object) { int result; /*fprintf(stderr, "DoDealloc obj= %s %p flags %.6x activation %d cmd %p opt=%p\n", objectName(object), object, object->flags, object->activationCount, object->id, object->opt);*/ - result = freeUnsetTraceVariable(interp, object); + result = FreeUnsetTraceVariable(interp, object); if (result != TCL_OK) { return result; } @@ -13777,7 +13845,8 @@ } -static int NsfCDeallocMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *obj) { +static int +NsfCDeallocMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *obj) { NsfObject *object; /* fprintf(stderr, "NsfCDeallocMethod obj %p %s\n",obj, ObjStr(obj));*/ @@ -13792,8 +13861,9 @@ return DoDealloc(interp, object); } -static int NsfCNewMethod(Tcl_Interp *interp, NsfClass *cl, NsfObject *withChildof, - int objc, Tcl_Obj *CONST objv[]) { +static int +NsfCNewMethod(Tcl_Interp *interp, NsfClass *cl, NsfObject *withChildof, + int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *fullnameObj; int result, prefixLength; Tcl_DString dFullname, *dsPtr = &dFullname; @@ -13828,7 +13898,7 @@ int callDirectly; ALLOC_ON_STACK(Tcl_Obj*, objc+3, ov); - callDirectly = CallDirectly(interp, &cl->object, XO_c_create_idx, &methodObj); + callDirectly = CallDirectly(interp, &cl->object, NSF_c_create_idx, &methodObj); ov[0] = objv[0]; ov[1] = methodObj; @@ -13851,8 +13921,9 @@ return result; } -static int NsfCFilterGuardMethod(Tcl_Interp *interp, NsfClass *cl, - CONST char *filter, Tcl_Obj *guardObj) { +static int +NsfCFilterGuardMethod(Tcl_Interp *interp, NsfClass *cl, + CONST char *filter, Tcl_Obj *guardObj) { NsfClassOpt *opt = cl->opt; if (opt && opt->classfilters) { @@ -13870,7 +13941,8 @@ filter, " on ", className(cl), (char *) NULL); } -static int NsfCMixinGuardMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *mixin, Tcl_Obj *guardObj) { +static int +NsfCMixinGuardMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *mixin, Tcl_Obj *guardObj) { NsfClassOpt *opt = cl->opt; if (opt && opt->classmixins) { @@ -13883,7 +13955,7 @@ NsfCmdList *h = CmdListFindCmdInList(mixinCmd, opt->classmixins); if (h) { if (h->clientData) - GuardDel((NsfCmdList*) h); + GuardDel((NsfCmdList *) h); GuardAdd(interp, h, guardObj); MixinInvalidateObjOrders(interp, cl); return TCL_OK; @@ -13895,8 +13967,9 @@ mixin, " on ", className(cl), (char *) NULL); } -static int RecreateObject(Tcl_Interp *interp, NsfClass *class, NsfObject *object, - int objc, Tcl_Obj *CONST objv[]) { +static int +RecreateObject(Tcl_Interp *interp, NsfClass *class, NsfObject *object, + int objc, Tcl_Obj *CONST objv[]) { int result; object->flags |= NSF_RECREATE; @@ -13920,10 +13993,10 @@ /* * dispatch "cleanup" method */ - if (CallDirectly(interp, object, XO_o_cleanup_idx, &methodObj)) { + if (CallDirectly(interp, object, NSF_o_cleanup_idx, &methodObj)) { result = NsfOCleanupMethod(interp, object); } else { - result = callMethod((ClientData) object, interp, methodObj, + result = CallMethod((ClientData) object, interp, methodObj, 2, 0, NSF_CM_NO_PROTECT); } } @@ -13932,16 +14005,17 @@ * Second: if cleanup was successful, initialize the object as usual */ if (result == TCL_OK) { - result = doObjInitialization(interp, object, objc, objv); + result = DoObjInitialization(interp, object, objc, objv); if (result == TCL_OK) { Tcl_SetObjResult(interp, object->cmdName); } } return result; } -static int NsfCRecreateMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj, - int objc, Tcl_Obj *CONST objv[]) { +static int +NsfCRecreateMethod(Tcl_Interp *interp, NsfClass *cl, Tcl_Obj *nameObj, + int objc, Tcl_Obj *CONST objv[]) { NsfObject *object; if (GetObjectFromObj(interp, nameObj, &object) != TCL_OK) @@ -13959,7 +14033,8 @@ /*************************** * Begin check Methods ***************************/ -static int NsfCheckBooleanArgs(Tcl_Interp *interp, CONST char *name, Tcl_Obj *valueObj) { +static int +NsfCheckBooleanArgs(Tcl_Interp *interp, CONST char *name, Tcl_Obj *valueObj) { int result, bool; Tcl_Obj *boolean; @@ -13979,7 +14054,8 @@ return TCL_OK; } -static int NsfCheckRequiredArgs(Tcl_Interp *interp, CONST char *name, Tcl_Obj *valueObj) { +static int +NsfCheckRequiredArgs(Tcl_Interp *interp, CONST char *name, Tcl_Obj *valueObj) { if (value == NULL) { return NsfVarErrMsg(interp, "required arg: '", name, "' missing", (char *) NULL); @@ -13993,12 +14069,10 @@ ***************************/ #endif -static int AggregatedMethodType(int methodType) { +static int +AggregatedMethodType(int methodType) { switch (methodType) { case MethodtypeNULL: /* default */ - /* TODO remove comment when settled. - methodType = NSF_METHODTYPE_SCRIPTED|NSF_METHODTYPE_BUILTIN; - break;*/ case MethodtypeAllIdx: methodType = NSF_METHODTYPE_SCRIPTED|NSF_METHODTYPE_BUILTIN|NSF_METHODTYPE_OBJECT; break; @@ -14042,12 +14116,12 @@ {-argName "pattern" -required 0} } */ -static int NsfObjInfoCallableMethod(Tcl_Interp *interp, NsfObject *object, - int subcmd, - int withMethodtype, int withCallprotection, - int withApplication, - int withNomixins, int withIncontext, CONST char *pattern) { - +static int +NsfObjInfoCallableMethod(Tcl_Interp *interp, NsfObject *object, + int subcmd, int withMethodtype, int withCallprotection, + int withApplication, + int withNomixins, int withIncontext, CONST char *pattern) { + if (subcmd != InfocallablesubcmdMethodsIdx) { if (withMethodtype || withCallprotection || withApplication || withNomixins || withIncontext) { return NsfVarErrMsg(interp, "options -methodtype, -callprotection, -application, ", @@ -14094,15 +14168,17 @@ {-argName "pattern" -required 0} } */ -static int NsfObjInfoChildrenMethod(Tcl_Interp *interp, NsfObject *object, CONST char *pattern) { +static int +NsfObjInfoChildrenMethod(Tcl_Interp *interp, NsfObject *object, CONST char *pattern) { return ListChildren(interp, object, pattern, 0); } /* objectInfoMethod class NsfObjInfoClassMethod { } */ -static int NsfObjInfoClassMethod(Tcl_Interp *interp, NsfObject *object) { +static int +NsfObjInfoClassMethod(Tcl_Interp *interp, NsfObject *object) { Tcl_SetObjResult(interp, object->cl->object.cmdName); return TCL_OK; } @@ -14112,7 +14188,8 @@ {-argName "filter" -required 1} } */ -static int NsfObjInfoFilterguardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *filter) { +static int +NsfObjInfoFilterguardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *filter) { return object->opt ? GuardList(interp, object->opt->filters, filter) : TCL_OK; } @@ -14123,7 +14200,8 @@ {-argName "pattern"} } */ -static int NsfObjInfoFiltermethodsMethod(Tcl_Interp *interp, NsfObject *object, +static int +NsfObjInfoFiltermethodsMethod(Tcl_Interp *interp, NsfObject *object, int withGuards, int withOrder, CONST char *pattern) { NsfObjectOpt *opt = object->opt; @@ -14142,7 +14220,8 @@ {-argName "name"} } */ -static int NsfObjInfoForwardMethod(Tcl_Interp *interp, NsfObject *object, int withDefinition, CONST char *pattern) { +static int +NsfObjInfoForwardMethod(Tcl_Interp *interp, NsfObject *object, int withDefinition, CONST char *pattern) { return object->nsPtr ? ListForward(interp, Tcl_Namespace_cmdTable(object->nsPtr), pattern, withDefinition) : TCL_OK; @@ -14163,7 +14242,8 @@ objectInfoMethod hasnamespace NsfObjInfoHasnamespaceMethod { } */ -static int NsfObjInfoHasnamespaceMethod(Tcl_Interp *interp, NsfObject *object) { +static int +NsfObjInfoHasnamespaceMethod(Tcl_Interp *interp, NsfObject *object) { Tcl_SetBooleanObj(Tcl_GetObjResult(interp), object->nsPtr != NULL); return TCL_OK; } @@ -14184,7 +14264,8 @@ {-argName "objectkind" -type "class|baseclass|metaclass"} } */ -static int NsfObjInfoIsMethod(Tcl_Interp *interp, NsfObject *object, int objectkind) { +static int +NsfObjInfoIsMethod(Tcl_Interp *interp, NsfObject *object, int objectkind) { int success = 0; switch (objectkind) { @@ -14212,7 +14293,8 @@ {-argName "name"} } */ -static int NsfObjInfoMethodMethod(Tcl_Interp *interp, NsfObject *object, +static int +NsfObjInfoMethodMethod(Tcl_Interp *interp, NsfObject *object, int subcmd, CONST char *methodName) { Tcl_Namespace *nsPtr = object->nsPtr; Tcl_Command cmd; @@ -14235,7 +14317,8 @@ {-argName "pattern"} } */ -static int NsfObjInfoMethodsMethod(Tcl_Interp *interp, NsfObject *object, +static int +NsfObjInfoMethodsMethod(Tcl_Interp *interp, NsfObject *object, int withMethodtype, int withCallproctection, int withNomixins, int withIncontext, CONST char *pattern) { return ListDefinedMethods(interp, object, pattern, 1 /* per-object */, @@ -14250,7 +14333,8 @@ {-argName "pattern" -type objpattern} } */ -static int NsfObjInfoMixinclassesMethod(Tcl_Interp *interp, NsfObject *object, +static int +NsfObjInfoMixinclassesMethod(Tcl_Interp *interp, NsfObject *object, int withGuards, int withOrder, CONST char *patternString, NsfObject *patternObj) { @@ -14268,15 +14352,17 @@ {-argName "mixin" -required 1} } */ -static int NsfObjInfoMixinguardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *mixin) { +static int +NsfObjInfoMixinguardMethod(Tcl_Interp *interp, NsfObject *object, CONST char *mixin) { return object->opt ? GuardList(interp, object->opt->mixins, mixin) : TCL_OK; } /* objectInfoMethod parent NsfObjInfoParentMethod { } */ -static int NsfObjInfoParentMethod(Tcl_Interp *interp, NsfObject *object) { +static int +NsfObjInfoParentMethod(Tcl_Interp *interp, NsfObject *object) { if (object->id) { Tcl_SetResult(interp, NSCmdFullName(object->id), TCL_VOLATILE); } @@ -14289,7 +14375,8 @@ {-argName "pattern" -required 0} } */ -static int NsfObjInfoPrecedenceMethod(Tcl_Interp *interp, NsfObject *object, +static int +NsfObjInfoPrecedenceMethod(Tcl_Interp *interp, NsfObject *object, int withIntrinsicOnly, CONST char *pattern) { NsfClasses *precedenceList = NULL, *pl; @@ -14306,12 +14393,13 @@ {-argName "pattern" -required 0} } */ -static int NsfObjInfoSlotObjectsMethod(Tcl_Interp *interp, NsfObject *object, CONST char *pattern) { +static int +NsfObjInfoSlotObjectsMethod(Tcl_Interp *interp, NsfObject *object, CONST char *pattern) { NsfObjects *pl, *slotObjects; Tcl_Obj *list = Tcl_NewListObj(0, NULL); /*NsfClass *slotClass = GetClassFromString(interp, "::nx::Slot");*/ - slotObjects = computeSlotObjects(interp, object, pattern /* not used */, 1); + slotObjects = ComputeSlotObjects(interp, object, pattern /* not used */, 1); for (pl=slotObjects; pl; pl = pl->nextPtr) { /*if (slotClass && !IsSubType(pl->obj->cl, slotClass)) continue;*/ @@ -14328,7 +14416,8 @@ {-argName "pattern" -required 0} } */ -static int NsfObjInfoVarsMethod(Tcl_Interp *interp, NsfObject *object, CONST char *pattern) { +static int +NsfObjInfoVarsMethod(Tcl_Interp *interp, NsfObject *object, CONST char *pattern) { Tcl_Obj *varlist, *okList, *element; int i, length; TclVarHashTable *varTable = object->nsPtr ? Tcl_Namespace_varTable(object->nsPtr) : object->varTable; @@ -14340,7 +14429,7 @@ okList = Tcl_NewListObj(0, NULL); for (i=0; iopt ? GuardList(interp, class->opt->classfilters, filter) : TCL_OK; } @@ -14373,8 +14463,9 @@ {-argName "pattern"} } */ -static int NsfClassInfoFiltermethodsMethod(Tcl_Interp *interp, NsfClass *class, - int withGuards, CONST char *pattern) { +static int +NsfClassInfoFiltermethodsMethod(Tcl_Interp *interp, NsfClass *class, + int withGuards, CONST char *pattern) { return class->opt ? FilterInfo(interp, class->opt->classfilters, pattern, withGuards, 0) : TCL_OK; } @@ -14384,8 +14475,9 @@ {-argName "name"} } */ -static int NsfClassInfoForwardMethod(Tcl_Interp *interp, NsfClass *class, - int withDefinition, CONST char *pattern) { +static int +NsfClassInfoForwardMethod(Tcl_Interp *interp, NsfClass *class, + int withDefinition, CONST char *pattern) { return ListForward(interp, Tcl_Namespace_cmdTable(class->nsPtr), pattern, withDefinition); } @@ -14394,7 +14486,8 @@ {-argName "pattern"} } */ -static int NsfClassInfoHeritageMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *pattern) { +static int +NsfClassInfoHeritageMethod(Tcl_Interp *interp, NsfClass *cl, CONST char *pattern) { NsfClasses *pl = ComputeOrder(cl, cl->order, Super); Tcl_ResetResult(interp); @@ -14409,8 +14502,9 @@ * get all instances of a class recursively into an initialized * String key hashtable */ -static int NsfClassInfoInstancesMethod1(Tcl_Interp *interp, NsfClass *startCl, - int withClosure, CONST char *pattern, NsfObject *matchObject) { +static int +NsfClassInfoInstancesMethod1(Tcl_Interp *interp, NsfClass *startCl, + int withClosure, CONST char *pattern, NsfObject *matchObject) { Tcl_HashTable *table = &startCl->instances; NsfClasses *sc; Tcl_HashSearch search; @@ -14446,8 +14540,9 @@ {-argName "pattern" -type objpattern} } */ -static int NsfClassInfoInstancesMethod(Tcl_Interp *interp, NsfClass *startCl, - int withClosure, CONST char *pattern, NsfObject *matchObject) { +static int +NsfClassInfoInstancesMethod(Tcl_Interp *interp, NsfClass *startCl, + int withClosure, CONST char *pattern, NsfObject *matchObject) { NsfClassInfoInstancesMethod1(interp, startCl, withClosure, pattern, matchObject); return TCL_OK; } @@ -14458,8 +14553,9 @@ {-argName "name"} } */ -static int NsfClassInfoMethodMethod(Tcl_Interp *interp, NsfClass *class, - int subcmd, CONST char *methodName) { +static int +NsfClassInfoMethodMethod(Tcl_Interp *interp, NsfClass *class, + int subcmd, CONST char *methodName) { Tcl_Namespace *nsPtr = class->nsPtr; Tcl_Command cmd; @@ -14481,9 +14577,10 @@ {-argName "pattern"} } */ -static int NsfClassInfoMethodsMethod(Tcl_Interp *interp, NsfClass *class, - int withMethodtype, int withCallproctection, - int withNomixins, int withIncontext, CONST char *pattern) { +static int +NsfClassInfoMethodsMethod(Tcl_Interp *interp, NsfClass *class, + int withMethodtype, int withCallproctection, + int withNomixins, int withIncontext, CONST char *pattern) { return ListDefinedMethods(interp, &class->object, pattern, 0 /* per-object */, AggregatedMethodType(withMethodtype), withCallproctection, withNomixins, withIncontext); @@ -14496,19 +14593,20 @@ {-argName "pattern" -type objpattern} } */ -static int NsfClassInfoMixinclassesMethod(Tcl_Interp *interp, NsfClass *class, - int withClosure, int withGuards, - CONST char *patternString, NsfObject *patternObj) { +static int +NsfClassInfoMixinclassesMethod(Tcl_Interp *interp, NsfClass *class, + int withClosure, int withGuards, + CONST char *patternString, NsfObject *patternObj) { NsfClassOpt *opt = class->opt; int rc; if (withClosure) { Tcl_HashTable objTable, *commandTable = &objTable; MEM_COUNT_ALLOC("Tcl_InitHashTable", commandTable); Tcl_InitHashTable(commandTable, TCL_ONE_WORD_KEYS); - rc = getAllClassMixins(interp, commandTable, class, withGuards, patternString, patternObj); + rc = GetAllClassMixins(interp, commandTable, class, withGuards, patternString, patternObj); if (patternObj && rc && !withGuards) { - Tcl_SetObjResult(interp, rc ? patternObj->cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, rc ? patternObj->cmdName : NsfGlobalObjs[NSF_EMPTY]); } Tcl_DeleteHashTable(commandTable); MEM_COUNT_FREE("Tcl_InitHashTable", commandTable); @@ -14524,7 +14622,8 @@ {-argName "mixin" -required 1} } */ -static int NsfClassInfoMixinguardMethod(Tcl_Interp *interp, NsfClass *class, CONST char *mixin) { +static int +NsfClassInfoMixinguardMethod(Tcl_Interp *interp, NsfClass *class, CONST char *mixin) { return class->opt ? GuardList(interp, class->opt->classmixins, mixin) : TCL_OK; } @@ -14535,8 +14634,9 @@ {-argName "pattern" -type objpattern} } */ -static int NsfClassInfoMixinOfMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, int withScope, - CONST char *patternString, NsfObject *patternObj) { +static int +NsfClassInfoMixinOfMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, int withScope, + CONST char *patternString, NsfObject *patternObj) { NsfClassOpt *opt = class->opt; int perClass, perObject; int rc; @@ -14565,19 +14665,19 @@ MEM_COUNT_ALLOC("Tcl_InitHashTable", commandTable); Tcl_InitHashTable(commandTable, TCL_ONE_WORD_KEYS); if (perClass) { - rc = getAllClassMixinsOf(interp, commandTable, class, 0, 1, patternString, patternObj); + rc = GetAllClassMixinsOf(interp, commandTable, class, 0, 1, patternString, patternObj); if (rc && patternObj) {goto finished;} } if (perObject) { - rc = getAllObjectMixinsOf(interp, commandTable, class, 0, 1, patternString, patternObj); + rc = GetAllObjectMixinsOf(interp, commandTable, class, 0, 1, patternString, patternObj); } Tcl_DeleteHashTable(commandTable); MEM_COUNT_FREE("Tcl_InitHashTable", commandTable); } finished: if (patternObj) { - Tcl_SetObjResult(interp, rc ? patternObj->cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, rc ? patternObj->cmdName : NsfGlobalObjs[NSF_EMPTY]); } return TCL_OK; } @@ -14586,7 +14686,8 @@ classInfoMethod slots NsfClassInfoSlotsMethod { } */ -static int NsfClassInfoSlotsMethod(Tcl_Interp *interp, NsfClass *class) { +static int +NsfClassInfoSlotsMethod(Tcl_Interp *interp, NsfClass *class) { Tcl_DString ds, *dsPtr = &ds; NsfObject *object; int result; @@ -14610,7 +14711,8 @@ {-argName "pattern" -type objpattern} } */ -static int NsfClassInfoSubclassMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, +static int +NsfClassInfoSubclassMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, CONST char *patternString, NsfObject *patternObj) { int rc; if (withClosure) { @@ -14626,7 +14728,7 @@ } if (patternObj) { - Tcl_SetObjResult(interp, rc ? patternObj->cmdName : NsfGlobalObjs[XOTE_EMPTY]); + Tcl_SetObjResult(interp, rc ? patternObj->cmdName : NsfGlobalObjs[NSF_EMPTY]); } return TCL_OK; @@ -14638,7 +14740,8 @@ {-argName "pattern" -type tclobj} } */ -static int NsfClassInfoSuperclassMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, Tcl_Obj *pattern) { +static int +NsfClassInfoSuperclassMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, Tcl_Obj *pattern) { return ListSuperclasses(interp, class, pattern, withClosure); } @@ -14651,7 +14754,7 @@ */ static int -ProcessMethodArguments(parseContext *pcPtr, Tcl_Interp *interp, +ProcessMethodArguments(ParseContext *pcPtr, Tcl_Interp *interp, NsfObject *object, int pushFrame, NsfParamDefs *paramDefs, CONST char *methodName, int objc, Tcl_Obj *CONST objv[]) { @@ -14700,7 +14803,7 @@ */ /*NsfPrintObjv("actual: ", objc, objv);*/ - parseContextExtendObjv(pcPtr, paramDefs->nrParams, elts-1, objv + 1 + pcPtr->lastobjc); + ParseContextExtendObjv(pcPtr, paramDefs->nrParams, elts-1, objv + 1 + pcPtr->lastobjc); } else { /* * A single argument was passed to "args". There is no need to @@ -14732,8 +14835,8 @@ varPtr = &Tcl_CallFrame_compiledLocals(varFramePtr)[i]; /*fprintf(stderr, "NsfUnsetUnknownArgsCmd var '%s' i %d fi %d var %p flags %.8x obj %p unk %p\n", ap->name, i, ap->frameIndex, varPtr, varPtr->flags, varPtr->value.objPtr, - NsfGlobalObjs[XOTE___UNKNOWN__]);*/ - if (varPtr->value.objPtr != NsfGlobalObjs[XOTE___UNKNOWN__]) continue; + NsfGlobalObjs[NSF___UNKNOWN__]);*/ + if (varPtr->value.objPtr != NsfGlobalObjs[NSF___UNKNOWN__]) continue; /*fprintf(stderr, "NsfUnsetUnknownArgsCmd must unset %s\n", ap->name);*/ Tcl_UnsetVar2(interp, ap->name, NULL, 0); } @@ -14766,7 +14869,7 @@ #ifdef DO_FULL_CLEANUP /* delete global variables and procs */ static void -deleteProcsAndVars(Tcl_Interp *interp) { +SeleteProcsAndVars(Tcl_Interp *interp) { Tcl_Namespace *nsPtr = Tcl_GetGlobalNamespace(interp); Tcl_HashTable *varTable = nsPtr ? Tcl_Namespace_varTable(ns) : NULL; Tcl_HashTable *cmdTable = nsPtr ? Tcl_Namespace_cmdTable(ns) : NULL; @@ -14778,7 +14881,7 @@ for (entryPtr = Tcl_FirstHashEntry(varTable, &search); entryPtr; entryPtr = Tcl_NextHashEntry(&search)) { Tcl_Obj *nameObj; - getVarAndNameFromHash(entryPtr, &varPtr, &nameObj); + GetVarAndNameFromHash(entryPtr, &varPtr, &nameObj); if (!TclIsVarUndefined(varPtr) || TclIsVarNamespaceVar(varPtr)) { /* fprintf(stderr, "unsetting var %s\n", ObjStr(nameObj));*/ Tcl_UnsetVar2(interp, ObjStr(nameObj), (char *)NULL, TCL_GLOBAL_ONLY); @@ -14837,7 +14940,7 @@ return result; } -static void +static void FinalObjectDeletion(Tcl_Interp *interp, NsfObject *object) { /* If a call to exit happens from a higher stack frame, the obejct refcount might not be decremented corectly. If we are @@ -14932,7 +15035,7 @@ /*fprintf(stderr, " ... delete object %s %p, class=%s id %p\n", key, object, className(object->cl), object->id);*/ - freeUnsetTraceVariable(interp, object); + FreeUnsetTraceVariable(interp, object); if (object->id) FinalObjectDeletion(interp, object); Tcl_DeleteHashEntry(hPtr); deleted++; @@ -14958,7 +15061,7 @@ && !IsBaseClass(cl) ) { /*fprintf(stderr, " ... delete class %s %p\n", key, cl); */ - freeUnsetTraceVariable(interp, &cl->object); + FreeUnsetTraceVariable(interp, &cl->object); if (cl->object.id) FinalObjectDeletion(interp, &cl->object); Tcl_DeleteHashEntry(hPtr); Index: generic/nsf.h =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/nsf.h (.../nsf.h) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ generic/nsf.h (.../nsf.h) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -1,6 +1,6 @@ /* -*- Mode: c++ -*- * - * Extended Object Tcl (XOTcl) + * Next Scripting Framework * * Copyright (C) 1999-2010 Gustaf Neumann, Uwe Zdun * Index: generic/nsfInt.h =================================================================== diff -u -rcb7e3a02c1964d38d85c7e129027fc1b3225d3e6 -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/nsfInt.h (.../nsfInt.h) (revision cb7e3a02c1964d38d85c7e129027fc1b3225d3e6) +++ generic/nsfInt.h (.../nsfInt.h) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -1,5 +1,5 @@ /* -*- Mode: c++ -*- - * Extended Object Tcl (XOTcl) + * Next Scripting Framework * * Copyright (C) 1999-2010 Gustaf Neumann, Uwe Zdun * @@ -249,7 +249,7 @@ /* * - * XOTcl Structures + * Next Scripting Structures * */ @@ -389,7 +389,7 @@ #define NSF_METHODTYPE_BUILTIN NSF_METHODTYPE_ALIAS|NSF_METHODTYPE_SETTER|NSF_METHODTYPE_FORWARDER|NSF_METHODTYPE_OTHER -/* flags for parseContext */ +/* flags for ParseContext */ #define NSF_PC_MUST_DECR 0x0001 #define NsfObjectSetClass(obj) \ @@ -502,20 +502,20 @@ } NsfClasses; typedef enum SystemMethodsIdx { - XO_c_alloc_idx, - XO_c_create_idx, - XO_c_dealloc_idx, - XO_c_recreate_idx, - XO_c_requireobject_idx, - XO_o_cleanup_idx, - XO_o_configure_idx, - XO_o_defaultmethod_idx, - XO_o_destroy_idx, - XO_o_init_idx, - XO_o_move_idx, - XO_o_objectparameter_idx, - XO_o_residualargs_idx, - XO_o_unknown_idx + NSF_c_alloc_idx, + NSF_c_create_idx, + NSF_c_dealloc_idx, + NSF_c_recreate_idx, + NSF_c_requireobject_idx, + NSF_o_cleanup_idx, + NSF_o_configure_idx, + NSF_o_defaultmethod_idx, + NSF_o_destroy_idx, + NSF_o_init_idx, + NSF_o_move_idx, + NSF_o_objectparameter_idx, + NSF_o_residualargs_idx, + NSF_o_unknown_idx } SystemMethodsIdx; #if !defined(NSF_C) @@ -545,32 +545,32 @@ NsfClass *rootMetaClass; int overloadedMethods; int definedMethods; - Tcl_Obj *methods[XO_o_unknown_idx+1]; + Tcl_Obj *methods[NSF_o_unknown_idx+1]; struct NsfObjectSystem *nextPtr; } NsfObjectSystem; -/* XOTcl global names and strings */ +/* Next Scripting global names and strings */ /* these are names and contents for global (corresponding) Tcl_Objs and Strings - otherwise these "constants" would have to be built every time they are used; now they are built once in Nsf_Init */ typedef enum { - XOTE_EMPTY, XOTE_ONE, + NSF_EMPTY, NSF_ONE, /* methods called internally */ - XOTE_CONFIGURE, + NSF_CONFIGURE, /* var names */ - XOTE_AUTONAMES, XOTE_DEFAULTMETACLASS, XOTE_DEFAULTSUPERCLASS, - XOTE_ALIAS_ARRAY, + NSF_AUTONAMES, NSF_DEFAULTMETACLASS, NSF_DEFAULTSUPERCLASS, + NSF_ALIAS_ARRAY, /* object/class names */ - XOTE_METHOD_PARAMETER_SLOT_OBJ, + NSF_METHOD_PARAMETER_SLOT_OBJ, /* constants */ - XOTE_ALIAS, XOTE_ARGS, XOTE_CMD, XOTE_FILTER, XOTE_FORWARD, - XOTE_METHOD, XOTE_OBJECT, XOTE_SETTER, - XOTE_GUARD_OPTION, XOTE___UNKNOWN__, + NSF_ALIAS, NSF_ARGS, NSF_CMD, NSF_FILTER, NSF_FORWARD, + NSF_METHOD, NSF_OBJECT, NSF_SETTER, + NSF_GUARD_OPTION, NSF___UNKNOWN__, /* Patly redefined Tcl commands; leave them together at the end */ - XOTE_EXPR, XOTE_FORMAT, XOTE_INFO, XOTE_INFO_FRAME, XOTE_INTERP, XOTE_IS, XOTE_RENAME, XOTE_SUBST + NSF_EXPR, NSF_FORMAT, NSF_INFO, NSF_INFO_FRAME, NSF_INTERP, NSF_IS, NSF_RENAME, NSF_SUBST } NsfGlobalNames; #if !defined(NSF_C) extern char *NsfGlobalStrings[]; @@ -595,7 +595,7 @@ #define NsfGlobalObjs RUNTIME_STATE(interp)->methodObjNames -/* XOTcl ShadowTclCommands */ +/* Next Scripting ShadowTclCommands */ typedef struct NsfShadowTclCommandInfo { TclObjCmdProcType proc; ClientData clientData; @@ -609,7 +609,7 @@ /* - * XOTcl CallStack + * Next Scripting CallStack */ typedef struct NsfCallStackContent { NsfObject *self; Index: generic/nsfShadow.c =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/nsfShadow.c (.../nsfShadow.c) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ generic/nsfShadow.c (.../nsfShadow.c) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -18,7 +18,7 @@ NsfReplaceCommandCleanup(Tcl_Interp *interp, NsfGlobalNames name) { Tcl_Command cmd; int result = TCL_OK; - NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-XOTE_EXPR]; + NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-NSF_EXPR]; /*fprintf(stderr," cleanup for %s ti=%p in %p\n", NsfGlobalStrings[name], ti, interp);*/ cmd = Tcl_GetCommandFromObj(interp, NsfGlobalObjs[name]); @@ -35,7 +35,7 @@ static void NsfReplaceCommandCheck(Tcl_Interp *interp, NsfGlobalNames name, Tcl_ObjCmdProc *proc) { Tcl_Command cmd; - NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-XOTE_EXPR]; + NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-NSF_EXPR]; cmd = Tcl_GetCommandFromObj(interp, NsfGlobalObjs[name]); if (cmd != NULL && ti->proc && Tcl_Command_objProc(cmd) != proc) { @@ -53,7 +53,7 @@ NsfReplaceCommand(Tcl_Interp *interp, NsfGlobalNames name, Tcl_ObjCmdProc *nsfReplacementProc, int pass) { Tcl_Command cmd; - NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-XOTE_EXPR]; + NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-NSF_EXPR]; int result = TCL_OK; /*fprintf(stderr,"NsfReplaceCommand %d\n",name);*/ @@ -89,29 +89,29 @@ /* wrong # args => normal Tcl ErrMsg*/ if (objc != 3) { - return NsfCallCommand(interp, XOTE_RENAME, objc, objv); + return NsfCallCommand(interp, NSF_RENAME, objc, objv); } /* if an obj/cl should be renamed => call the XOTcl move method */ cmd = Tcl_FindCommand(interp, ObjStr(objv[1]), (Tcl_Namespace *)NULL,0); if (cmd) { NsfObject *object = NsfGetObjectFromCmdPtr(cmd); - Tcl_Obj *methodObj = object ? NsfMethodObj(interp, object, XO_o_move_idx) : NULL; + Tcl_Obj *methodObj = object ? NsfMethodObj(interp, object, NSF_o_move_idx) : NULL; if (object && methodObj) { return NsfCallMethodWithArgs((ClientData)object, interp, methodObj, objv[2], 1, 0, 0); } } /* Actually rename the cmd using Tcl's rename*/ - return NsfCallCommand(interp, XOTE_RENAME, objc, objv); + return NsfCallCommand(interp, NSF_RENAME, objc, objv); } static int Nsf_InfoFrameObjCmd(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { int result; - result = NsfCallCommand(interp, XOTE_INFO_FRAME, objc, objv); + result = NsfCallCommand(interp, NSF_INFO_FRAME, objc, objv); if (result == TCL_OK && objc == 2) { int level, topLevel, frameFlags; @@ -144,7 +144,7 @@ Tcl_ListObjAppendElement(interp, resultObj, cscPtr->self->cmdName); Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("class",5)); Tcl_ListObjAppendElement(interp, resultObj, - cscPtr->cl ? cscPtr->cl->object.cmdName : NsfGlobalObjs[XOTE_EMPTY]); + cscPtr->cl ? cscPtr->cl->object.cmdName : NsfGlobalObjs[NSF_EMPTY]); Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("frametype",9)); if (cscPtr->frameType == NSF_CSC_TYPE_PLAIN) { frameType = "intrinsic"; @@ -175,30 +175,30 @@ int initialized = (RUNTIME_STATE(interp)->tclCommands != NULL); assert(initialized == 0); RUNTIME_STATE(interp)->tclCommands = - NEW_ARRAY(NsfShadowTclCommandInfo, XOTE_SUBST - XOTE_EXPR + 1); + NEW_ARRAY(NsfShadowTclCommandInfo, NSF_SUBST - NSF_EXPR + 1); /*fprintf(stderr, "+++ load tcl commands %d %d\n", load, initialized);*/ #ifdef USE_TCL_STUBS /* no commands are overloaded, these are only used for calling e.g. Tcl_ExprObjCmd(), Tcl_IncrObjCmd() and Tcl_SubstObjCmd(), which are not available in though the stub table */ - rc |= NsfReplaceCommand(interp, XOTE_EXPR, NULL, initialized); - rc |= NsfReplaceCommand(interp, XOTE_SUBST, NULL, initialized); + rc |= NsfReplaceCommand(interp, NSF_EXPR, NULL, initialized); + rc |= NsfReplaceCommand(interp, NSF_SUBST, NULL, initialized); #endif - rc |= NsfReplaceCommand(interp, XOTE_FORMAT, NULL, initialized); - rc |= NsfReplaceCommand(interp, XOTE_INTERP, NULL, initialized); - rc |= NsfReplaceCommand(interp, XOTE_IS, NULL, initialized); + rc |= NsfReplaceCommand(interp, NSF_FORMAT, NULL, initialized); + rc |= NsfReplaceCommand(interp, NSF_INTERP, NULL, initialized); + rc |= NsfReplaceCommand(interp, NSF_IS, NULL, initialized); /* for the following commands, we have to add our own semantics */ - rc |= NsfReplaceCommand(interp, XOTE_INFO_FRAME, Nsf_InfoFrameObjCmd, initialized); - rc |= NsfReplaceCommand(interp, XOTE_RENAME, Nsf_RenameObjCmd, initialized); + rc |= NsfReplaceCommand(interp, NSF_INFO_FRAME, Nsf_InfoFrameObjCmd, initialized); + rc |= NsfReplaceCommand(interp, NSF_RENAME, Nsf_RenameObjCmd, initialized); } else if (load == SHADOW_REFETCH) { - NsfReplaceCommandCheck(interp, XOTE_RENAME, Nsf_RenameObjCmd); + NsfReplaceCommandCheck(interp, NSF_RENAME, Nsf_RenameObjCmd); } else { - NsfReplaceCommandCleanup(interp, XOTE_RENAME); - NsfReplaceCommandCleanup(interp, XOTE_INFO_FRAME); + NsfReplaceCommandCleanup(interp, NSF_RENAME); + NsfReplaceCommandCleanup(interp, NSF_INFO_FRAME); FREE(NsfShadowTclCommandInfo*, RUNTIME_STATE(interp)->tclCommands); RUNTIME_STATE(interp)->tclCommands = NULL; } @@ -212,7 +212,7 @@ int NsfCallCommand(Tcl_Interp *interp, NsfGlobalNames name, int objc, Tcl_Obj *CONST objv[]) { int result; - NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-XOTE_EXPR]; + NsfShadowTclCommandInfo *ti = &RUNTIME_STATE(interp)->tclCommands[name-NSF_EXPR]; ALLOC_ON_STACK(Tcl_Obj*,objc, ov); /* {int i; Index: generic/tclAPI.h =================================================================== diff -u -r8eddf67371ec031084a6ef98fdec21e38dff85ff -r1e14e709ba184c6daf7a2f94605a2cff65d7706c --- generic/tclAPI.h (.../tclAPI.h) (revision 8eddf67371ec031084a6ef98fdec21e38dff85ff) +++ generic/tclAPI.h (.../tclAPI.h) (revision 1e14e709ba184c6daf7a2f94605a2cff65d7706c) @@ -1,5 +1,5 @@ -static int convertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"args", "body", "definition", "handle", "parameter", "parametersyntax", "type", "precondition", "postcondition", NULL}; @@ -10,7 +10,7 @@ } enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdHandleIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx}; -static int convertToMethodtype(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToMethodtype(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"all", "scripted", "builtin", "alias", "forwarder", "object", "setter", NULL}; @@ -21,7 +21,7 @@ } enum MethodtypeIdx {MethodtypeNULL, MethodtypeAllIdx, MethodtypeScriptedIdx, MethodtypeBuiltinIdx, MethodtypeAliasIdx, MethodtypeForwarderIdx, MethodtypeObjectIdx, MethodtypeSetterIdx}; -static int convertToCallprotection(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToCallprotection(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"all", "protected", "public", NULL}; @@ -32,7 +32,7 @@ } enum CallprotectionIdx {CallprotectionNULL, CallprotectionAllIdx, CallprotectionProtectedIdx, CallprotectionPublicIdx}; -static int convertToScope(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToScope(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"all", "class", "object", NULL}; @@ -43,7 +43,7 @@ } enum ScopeIdx {ScopeNULL, ScopeAllIdx, ScopeClassIdx, ScopeObjectIdx}; -static int convertToAssertionsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToAssertionsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"check", "object-invar", "class-invar", NULL}; @@ -54,7 +54,7 @@ } enum AssertionsubcmdIdx {AssertionsubcmdNULL, AssertionsubcmdCheckIdx, AssertionsubcmdObject_invarIdx, AssertionsubcmdClass_invarIdx}; -static int convertToConfigureoption(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToConfigureoption(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"filter", "softrecreate", "objectsystems", "keepinitcmd", "checkresults", "checkarguments", NULL}; @@ -65,7 +65,7 @@ } enum ConfigureoptionIdx {ConfigureoptionNULL, ConfigureoptionFilterIdx, ConfigureoptionSoftrecreateIdx, ConfigureoptionObjectsystemsIdx, ConfigureoptionKeepinitcmdIdx, ConfigureoptionCheckresultsIdx, ConfigureoptionCheckargumentsIdx}; -static int convertToCurrentoption(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToCurrentoption(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"proc", "method", "object", "class", "activelevel", "args", "activemixin", "calledproc", "calledmethod", "calledclass", "callingproc", "callingmethod", "callingclass", "callinglevel", "callingobject", "filterreg", "isnextcall", "next", NULL}; @@ -76,7 +76,7 @@ } enum CurrentoptionIdx {CurrentoptionNULL, CurrentoptionProcIdx, CurrentoptionMethodIdx, CurrentoptionObjectIdx, CurrentoptionClassIdx, CurrentoptionActivelevelIdx, CurrentoptionArgsIdx, CurrentoptionActivemixinIdx, CurrentoptionCalledprocIdx, CurrentoptionCalledmethodIdx, CurrentoptionCalledclassIdx, CurrentoptionCallingprocIdx, CurrentoptionCallingmethodIdx, CurrentoptionCallingclassIdx, CurrentoptionCallinglevelIdx, CurrentoptionCallingobjectIdx, CurrentoptionFilterregIdx, CurrentoptionIsnextcallIdx, CurrentoptionNextIdx}; -static int convertToMethodproperty(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToMethodproperty(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"class-only", "protected", "redefine-protected", "returns", "slotobj", NULL}; @@ -87,7 +87,7 @@ } enum MethodpropertyIdx {MethodpropertyNULL, MethodpropertyClass_onlyIdx, MethodpropertyProtectedIdx, MethodpropertyRedefine_protectedIdx, MethodpropertyReturnsIdx, MethodpropertySlotobjIdx}; -static int convertToRelationtype(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToRelationtype(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"object-mixin", "class-mixin", "object-filter", "class-filter", "class", "superclass", "rootclass", NULL}; @@ -98,7 +98,7 @@ } enum RelationtypeIdx {RelationtypeNULL, RelationtypeObject_mixinIdx, RelationtypeClass_mixinIdx, RelationtypeObject_filterIdx, RelationtypeClass_filterIdx, RelationtypeClassIdx, RelationtypeSuperclassIdx, RelationtypeRootclassIdx}; -static int convertToInfocallablesubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToInfocallablesubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"filter", "method", "methods", NULL}; @@ -109,7 +109,7 @@ } enum InfocallablesubcmdIdx {InfocallablesubcmdNULL, InfocallablesubcmdFilterIdx, InfocallablesubcmdMethodIdx, InfocallablesubcmdMethodsIdx}; -static int convertToObjectkind(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, +static int ConvertToObjectkind(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; static CONST char *opts[] = {"class", "baseclass", "metaclass", NULL}; @@ -131,9 +131,9 @@ static int ArgumentParse(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], NsfObject *obj, Tcl_Obj *procName, NsfParam CONST *paramPtr, int nrParameters, int doCheck, - parseContext *pc); + ParseContext *pc); -static int getMatchObject(Tcl_Interp *interp, Tcl_Obj *patternObj, Tcl_Obj *origObj, +static int GetMatchObject(Tcl_Interp *interp, Tcl_Obj *patternObj, Tcl_Obj *origObj, NsfObject **matchObject, CONST char **pattern); /* just to define the symbol */ @@ -388,7 +388,7 @@ static int NsfCAllocMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -399,15 +399,15 @@ } else { Tcl_Obj *name = (Tcl_Obj *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCAllocMethod(interp, cl, name); } } static int NsfCCreateMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -418,15 +418,15 @@ } else { CONST char *name = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCCreateMethod(interp, cl, name, objc, objv); } } static int NsfCDeallocMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -437,15 +437,15 @@ } else { Tcl_Obj *object = (Tcl_Obj *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCDeallocMethod(interp, cl, object); } } static int NsfCFilterGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -457,15 +457,15 @@ CONST char *filter = (CONST char *)pc.clientData[0]; Tcl_Obj *guard = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCFilterGuardMethod(interp, cl, filter, guard); } } static int NsfCMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -477,15 +477,15 @@ CONST char *mixin = (CONST char *)pc.clientData[0]; Tcl_Obj *guard = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCMixinGuardMethod(interp, cl, mixin, guard); } } static int NsfCNewMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -496,15 +496,15 @@ } else { NsfObject *withChildof = (NsfObject *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCNewMethod(interp, cl, withChildof, objc-pc.lastobjc, objv+pc.lastobjc); } } static int NsfCRecreateMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -515,15 +515,15 @@ } else { Tcl_Obj *name = (Tcl_Obj *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCRecreateMethod(interp, cl, name, objc, objv); } } static int NsfClassInfoFilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -534,15 +534,15 @@ } else { CONST char *filter = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoFilterguardMethod(interp, cl, filter); } } static int NsfClassInfoFiltermethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -554,15 +554,15 @@ int withGuards = (int )PTR2INT(pc.clientData[0]); CONST char *pattern = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoFiltermethodsMethod(interp, cl, withGuards, pattern); } } static int NsfClassInfoForwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -574,15 +574,15 @@ int withDefinition = (int )PTR2INT(pc.clientData[0]); CONST char *name = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoForwardMethod(interp, cl, withDefinition, name); } } static int NsfClassInfoHeritageMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -593,15 +593,15 @@ } else { CONST char *pattern = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoHeritageMethod(interp, cl, pattern); } } static int NsfClassInfoInstancesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -616,14 +616,14 @@ Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[1]; int returnCode; - if (getMatchObject(interp, pattern, objc>1 ? objv[1] : NULL, &patternObj, &patternString) == -1) { + if (GetMatchObject(interp, pattern, objc>1 ? objv[1] : NULL, &patternObj, &patternString) == -1) { if (pattern) { DECR_REF_COUNT(pattern); } return TCL_OK; } - parseContextRelease(&pc); + ParseContextRelease(&pc); returnCode = NsfClassInfoInstancesMethod(interp, cl, withClosure, patternString, patternObj); if (pattern) { @@ -635,7 +635,7 @@ static int NsfClassInfoMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -647,15 +647,15 @@ int infomethodsubcmd = (int )PTR2INT(pc.clientData[0]); CONST char *name = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoMethodMethod(interp, cl, infomethodsubcmd, name); } } static int NsfClassInfoMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -670,15 +670,15 @@ int withIncontext = (int )PTR2INT(pc.clientData[3]); CONST char *pattern = (CONST char *)pc.clientData[4]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoMethodsMethod(interp, cl, withMethodtype, withCallprotection, withNomixins, withIncontext, pattern); } } static int NsfClassInfoMixinOfMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -694,14 +694,14 @@ Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[2]; int returnCode; - if (getMatchObject(interp, pattern, objc>2 ? objv[2] : NULL, &patternObj, &patternString) == -1) { + if (GetMatchObject(interp, pattern, objc>2 ? objv[2] : NULL, &patternObj, &patternString) == -1) { if (pattern) { DECR_REF_COUNT(pattern); } return TCL_OK; } - parseContextRelease(&pc); + ParseContextRelease(&pc); returnCode = NsfClassInfoMixinOfMethod(interp, cl, withClosure, withScope, patternString, patternObj); if (pattern) { @@ -713,7 +713,7 @@ static int NsfClassInfoMixinclassesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -729,14 +729,14 @@ Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[2]; int returnCode; - if (getMatchObject(interp, pattern, objc>2 ? objv[2] : NULL, &patternObj, &patternString) == -1) { + if (GetMatchObject(interp, pattern, objc>2 ? objv[2] : NULL, &patternObj, &patternString) == -1) { if (pattern) { DECR_REF_COUNT(pattern); } return TCL_OK; } - parseContextRelease(&pc); + ParseContextRelease(&pc); returnCode = NsfClassInfoMixinclassesMethod(interp, cl, withClosure, withGuards, patternString, patternObj); if (pattern) { @@ -748,7 +748,7 @@ static int NsfClassInfoMixinguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -759,15 +759,15 @@ } else { CONST char *mixin = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoMixinguardMethod(interp, cl, mixin); } } static int NsfClassInfoSlotsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -778,15 +778,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoSlotsMethod(interp, cl); } } static int NsfClassInfoSubclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -801,14 +801,14 @@ Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[1]; int returnCode; - if (getMatchObject(interp, pattern, objc>1 ? objv[1] : NULL, &patternObj, &patternString) == -1) { + if (GetMatchObject(interp, pattern, objc>1 ? objv[1] : NULL, &patternObj, &patternString) == -1) { if (pattern) { DECR_REF_COUNT(pattern); } return TCL_OK; } - parseContextRelease(&pc); + ParseContextRelease(&pc); returnCode = NsfClassInfoSubclassMethod(interp, cl, withClosure, patternString, patternObj); if (pattern) { @@ -820,7 +820,7 @@ static int NsfClassInfoSuperclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfClass *cl = NsfObjectToClass(clientData); if (!cl) return NsfObjErrType(interp, objv[0], "Class", ""); if (ArgumentParse(interp, objc, objv, (NsfObject *) cl, objv[0], @@ -832,15 +832,15 @@ int withClosure = (int )PTR2INT(pc.clientData[0]); Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfClassInfoSuperclassMethod(interp, cl, withClosure, pattern); } } static int NsfAliasCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfAliasCmdIdx].paramDefs, @@ -855,15 +855,15 @@ int withObjscope = (int )PTR2INT(pc.clientData[4]); Tcl_Obj *cmdName = (Tcl_Obj *)pc.clientData[5]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfAliasCmd(interp, object, withPer_object, methodName, withNonleaf, withObjscope, cmdName); } } static int NsfAssertionCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfAssertionCmdIdx].paramDefs, @@ -875,7 +875,7 @@ int assertionsubcmd = (int )PTR2INT(pc.clientData[1]); Tcl_Obj *arg = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfAssertionCmd(interp, object, assertionsubcmd, arg); } @@ -892,7 +892,7 @@ static int NsfConfigureCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfConfigureCmdIdx].paramDefs, @@ -903,15 +903,15 @@ int configureoption = (int )PTR2INT(pc.clientData[0]); Tcl_Obj *value = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfConfigureCmd(interp, configureoption, value); } } static int NsfCreateObjectSystemCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfCreateObjectSystemCmdIdx].paramDefs, @@ -923,15 +923,15 @@ Tcl_Obj *rootMetaClass = (Tcl_Obj *)pc.clientData[1]; Tcl_Obj *systemMethods = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCreateObjectSystemCmd(interp, rootClass, rootMetaClass, systemMethods); } } static int NsfCurrentCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfCurrentCmdIdx].paramDefs, @@ -941,15 +941,15 @@ } else { int currentoption = (int )PTR2INT(pc.clientData[0]); - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfCurrentCmd(interp, currentoption); } } static int NsfDeprecatedCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfDeprecatedCmdIdx].paramDefs, @@ -961,15 +961,15 @@ CONST char *oldCmd = (CONST char *)pc.clientData[1]; CONST char *newCmd = (CONST char *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfDeprecatedCmd(interp, what, oldCmd, newCmd); } } static int NsfDispatchCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfDispatchCmdIdx].paramDefs, @@ -981,15 +981,15 @@ int withObjscope = (int )PTR2INT(pc.clientData[1]); Tcl_Obj *command = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfDispatchCmd(interp, object, withObjscope, command, objc-pc.lastobjc, objv+pc.lastobjc); } } static int NsfExistsVarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfExistsVarCmdIdx].paramDefs, @@ -1000,15 +1000,15 @@ NsfObject *object = (NsfObject *)pc.clientData[0]; CONST char *var = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfExistsVarCmd(interp, object, var); } } static int NsfFinalizeObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfFinalizeObjCmdIdx].paramDefs, @@ -1018,15 +1018,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfFinalizeObjCmd(interp); } } static int NsfForwardCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfForwardCmdIdx].paramDefs, @@ -1045,15 +1045,15 @@ int withVerbose = (int )PTR2INT(pc.clientData[8]); Tcl_Obj *target = (Tcl_Obj *)pc.clientData[9]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfForwardCmd(interp, object, withPer_object, method, withDefault, withEarlybinding, withMethodprefix, withObjscope, withOnerror, withVerbose, target, objc-pc.lastobjc, objv+pc.lastobjc); } } static int NsfImportvarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfImportvarCmdIdx].paramDefs, @@ -1063,15 +1063,15 @@ } else { NsfObject *object = (NsfObject *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfImportvarCmd(interp, object, objc-pc.lastobjc, objv+pc.lastobjc); } } static int NsfInterpObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfInterpObjCmdIdx].paramDefs, @@ -1081,15 +1081,15 @@ } else { CONST char *name = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfInterpObjCmd(interp, name, objc, objv); } } static int NsfInvalidateObjectParameterCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfInvalidateObjectParameterCmdIdx].paramDefs, @@ -1099,15 +1099,15 @@ } else { NsfClass *class = (NsfClass *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfInvalidateObjectParameterCmd(interp, class); } } static int NsfIsCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfIsCmdIdx].paramDefs, @@ -1119,15 +1119,15 @@ Tcl_Obj *constraint = (Tcl_Obj *)pc.clientData[1]; Tcl_Obj *value = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfIsCmd(interp, withComplain, constraint, value); } } static int NsfIsObjectCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfIsObjectCmdIdx].paramDefs, @@ -1137,15 +1137,15 @@ } else { Tcl_Obj *object = (Tcl_Obj *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfIsObjectCmd(interp, object); } } static int NsfMethodCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfMethodCmdIdx].paramDefs, @@ -1163,15 +1163,15 @@ Tcl_Obj *withPrecondition = (Tcl_Obj *)pc.clientData[7]; Tcl_Obj *withPostcondition = (Tcl_Obj *)pc.clientData[8]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfMethodCmd(interp, object, withInner_namespace, withPer_object, withPublic, name, args, body, withPrecondition, withPostcondition); } } static int NsfMethodPropertyCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfMethodPropertyCmdIdx].paramDefs, @@ -1185,15 +1185,15 @@ int methodproperty = (int )PTR2INT(pc.clientData[3]); Tcl_Obj *value = (Tcl_Obj *)pc.clientData[4]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfMethodPropertyCmd(interp, object, withPer_object, methodName, methodproperty, value); } } static int NsfMyCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfMyCmdIdx].paramDefs, @@ -1204,15 +1204,15 @@ int withLocal = (int )PTR2INT(pc.clientData[0]); Tcl_Obj *method = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfMyCmd(interp, withLocal, method, objc-pc.lastobjc, objv+pc.lastobjc); } } static int NsfNSCopyCmdsStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfNSCopyCmdsIdx].paramDefs, @@ -1223,15 +1223,15 @@ Tcl_Obj *fromNs = (Tcl_Obj *)pc.clientData[0]; Tcl_Obj *toNs = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfNSCopyCmds(interp, fromNs, toNs); } } static int NsfNSCopyVarsStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfNSCopyVarsIdx].paramDefs, @@ -1242,15 +1242,15 @@ Tcl_Obj *fromNs = (Tcl_Obj *)pc.clientData[0]; Tcl_Obj *toNs = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfNSCopyVars(interp, fromNs, toNs); } } static int NsfQualifyObjCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfQualifyObjCmdIdx].paramDefs, @@ -1260,15 +1260,15 @@ } else { Tcl_Obj *name = (Tcl_Obj *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfQualifyObjCmd(interp, name); } } static int NsfRelationCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfRelationCmdIdx].paramDefs, @@ -1280,15 +1280,15 @@ int relationtype = (int )PTR2INT(pc.clientData[1]); Tcl_Obj *value = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfRelationCmd(interp, object, relationtype, value); } } static int NsfSetVarCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfSetVarCmdIdx].paramDefs, @@ -1300,15 +1300,15 @@ Tcl_Obj *variable = (Tcl_Obj *)pc.clientData[1]; Tcl_Obj *value = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfSetVarCmd(interp, object, variable, value); } } static int NsfSetterCmdStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], method_definitions[NsfSetterCmdIdx].paramDefs, @@ -1320,15 +1320,15 @@ int withPer_object = (int )PTR2INT(pc.clientData[1]); Tcl_Obj *parameter = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfSetterCmd(interp, object, withPer_object, parameter); } } static int NsfOAutonameMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1341,15 +1341,15 @@ int withReset = (int )PTR2INT(pc.clientData[1]); Tcl_Obj *name = (Tcl_Obj *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOAutonameMethod(interp, obj, withInstance, withReset, name); } } static int NsfOCleanupMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1360,7 +1360,7 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOCleanupMethod(interp, obj); } @@ -1378,7 +1378,7 @@ static int NsfODestroyMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1389,15 +1389,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfODestroyMethod(interp, obj); } } static int NsfOExistsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1408,15 +1408,15 @@ } else { CONST char *var = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOExistsMethod(interp, obj, var); } } static int NsfOFilterGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1428,7 +1428,7 @@ CONST char *filter = (CONST char *)pc.clientData[0]; Tcl_Obj *guard = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOFilterGuardMethod(interp, obj, filter, guard); } @@ -1446,7 +1446,7 @@ static int NsfOMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1458,15 +1458,15 @@ CONST char *mixin = (CONST char *)pc.clientData[0]; Tcl_Obj *guard = (Tcl_Obj *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOMixinGuardMethod(interp, obj, mixin, guard); } } static int NsfONoinitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1477,15 +1477,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfONoinitMethod(interp, obj); } } static int NsfORequireNamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1496,7 +1496,7 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfORequireNamespaceMethod(interp, obj); } @@ -1534,7 +1534,7 @@ static int NsfOVolatileMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1545,15 +1545,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOVolatileMethod(interp, obj); } } static int NsfOVwaitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1564,15 +1564,15 @@ } else { CONST char *varname = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfOVwaitMethod(interp, obj, varname); } } static int NsfObjInfoCallableMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1589,15 +1589,15 @@ int withIncontext = (int )PTR2INT(pc.clientData[5]); CONST char *pattern = (CONST char *)pc.clientData[6]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoCallableMethod(interp, obj, infocallablesubcmd, withMethodtype, withCallprotection, withApplication, withNomixins, withIncontext, pattern); } } static int NsfObjInfoChildrenMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1608,15 +1608,15 @@ } else { CONST char *pattern = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoChildrenMethod(interp, obj, pattern); } } static int NsfObjInfoClassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1627,15 +1627,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoClassMethod(interp, obj); } } static int NsfObjInfoFilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1646,15 +1646,15 @@ } else { CONST char *filter = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoFilterguardMethod(interp, obj, filter); } } static int NsfObjInfoFiltermethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1667,15 +1667,15 @@ int withOrder = (int )PTR2INT(pc.clientData[1]); CONST char *pattern = (CONST char *)pc.clientData[2]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoFiltermethodsMethod(interp, obj, withGuards, withOrder, pattern); } } static int NsfObjInfoForwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1687,15 +1687,15 @@ int withDefinition = (int )PTR2INT(pc.clientData[0]); CONST char *name = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoForwardMethod(interp, obj, withDefinition, name); } } static int NsfObjInfoHasMixinMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1706,15 +1706,15 @@ } else { NsfClass *class = (NsfClass *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoHasMixinMethod(interp, obj, class); } } static int NsfObjInfoHasTypeMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1725,15 +1725,15 @@ } else { NsfClass *class = (NsfClass *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoHasTypeMethod(interp, obj, class); } } static int NsfObjInfoHasnamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1744,15 +1744,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoHasnamespaceMethod(interp, obj); } } static int NsfObjInfoIsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1763,15 +1763,15 @@ } else { int objectkind = (int )PTR2INT(pc.clientData[0]); - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoIsMethod(interp, obj, objectkind); } } static int NsfObjInfoMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1783,15 +1783,15 @@ int infomethodsubcmd = (int )PTR2INT(pc.clientData[0]); CONST char *name = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoMethodMethod(interp, obj, infomethodsubcmd, name); } } static int NsfObjInfoMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1806,15 +1806,15 @@ int withIncontext = (int )PTR2INT(pc.clientData[3]); CONST char *pattern = (CONST char *)pc.clientData[4]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoMethodsMethod(interp, obj, withMethodtype, withCallprotection, withNomixins, withIncontext, pattern); } } static int NsfObjInfoMixinclassesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1830,14 +1830,14 @@ Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[2]; int returnCode; - if (getMatchObject(interp, pattern, objc>2 ? objv[2] : NULL, &patternObj, &patternString) == -1) { + if (GetMatchObject(interp, pattern, objc>2 ? objv[2] : NULL, &patternObj, &patternString) == -1) { if (pattern) { DECR_REF_COUNT(pattern); } return TCL_OK; } - parseContextRelease(&pc); + ParseContextRelease(&pc); returnCode = NsfObjInfoMixinclassesMethod(interp, obj, withGuards, withOrder, patternString, patternObj); if (pattern) { @@ -1849,7 +1849,7 @@ static int NsfObjInfoMixinguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1860,15 +1860,15 @@ } else { CONST char *mixin = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoMixinguardMethod(interp, obj, mixin); } } static int NsfObjInfoParentMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1879,15 +1879,15 @@ } else { - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoParentMethod(interp, obj); } } static int NsfObjInfoPrecedenceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1899,15 +1899,15 @@ int withIntrinsic = (int )PTR2INT(pc.clientData[0]); CONST char *pattern = (CONST char *)pc.clientData[1]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoPrecedenceMethod(interp, obj, withIntrinsic, pattern); } } static int NsfObjInfoSlotObjectsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1918,15 +1918,15 @@ } else { CONST char *pattern = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoSlotObjectsMethod(interp, obj, pattern); } } static int NsfObjInfoVarsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; + ParseContext pc; NsfObject *obj = (NsfObject *)clientData; if (!obj) return NsfObjErrType(interp, objv[0], "Object", ""); if (ArgumentParse(interp, objc, objv, obj, objv[0], @@ -1937,246 +1937,246 @@ } else { CONST char *pattern = (CONST char *)pc.clientData[0]; - parseContextRelease(&pc); + ParseContextRelease(&pc); return NsfObjInfoVarsMethod(interp, obj, pattern); } } static methodDefinition method_definitions[] = { {"::nsf::cmd::Class::alloc", NsfCAllocMethodStub, 1, { - {"name", 1, 0, convertToTclobj}} + {"name", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Class::create", NsfCCreateMethodStub, 2, { - {"name", 1, 0, convertToString}, - {"args", 0, 0, convertToNothing}} + {"name", 1, 0, ConvertToString}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Class::dealloc", NsfCDeallocMethodStub, 1, { - {"object", 1, 0, convertToTclobj}} + {"object", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Class::filterguard", NsfCFilterGuardMethodStub, 2, { - {"filter", 1, 0, convertToString}, - {"guard", 1, 0, convertToTclobj}} + {"filter", 1, 0, ConvertToString}, + {"guard", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Class::mixinguard", NsfCMixinGuardMethodStub, 2, { - {"mixin", 1, 0, convertToString}, - {"guard", 1, 0, convertToTclobj}} + {"mixin", 1, 0, ConvertToString}, + {"guard", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Class::new", NsfCNewMethodStub, 2, { - {"-childof", 0, 1, convertToObject}, - {"args", 0, 0, convertToNothing}} + {"-childof", 0, 1, ConvertToObject}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Class::recreate", NsfCRecreateMethodStub, 2, { - {"name", 1, 0, convertToTclobj}, - {"args", 0, 0, convertToNothing}} + {"name", 1, 0, ConvertToTclobj}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::ClassInfo::filterguard", NsfClassInfoFilterguardMethodStub, 1, { - {"filter", 1, 0, convertToString}} + {"filter", 1, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::filtermethods", NsfClassInfoFiltermethodsMethodStub, 2, { - {"-guards", 0, 0, convertToString}, - {"pattern", 0, 0, convertToString}} + {"-guards", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::forward", NsfClassInfoForwardMethodStub, 2, { - {"-definition", 0, 0, convertToString}, - {"name", 0, 0, convertToString}} + {"-definition", 0, 0, ConvertToString}, + {"name", 0, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::heritage", NsfClassInfoHeritageMethodStub, 1, { - {"pattern", 0, 0, convertToString}} + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::instances", NsfClassInfoInstancesMethodStub, 2, { - {"-closure", 0, 0, convertToString}, - {"pattern", 0, 0, convertToObjpattern}} + {"-closure", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToObjpattern}} }, {"::nsf::cmd::ClassInfo::method", NsfClassInfoMethodMethodStub, 2, { - {"infomethodsubcmd", 0, 0, convertToInfomethodsubcmd}, - {"name", 0, 0, convertToString}} + {"infomethodsubcmd", 0, 0, ConvertToInfomethodsubcmd}, + {"name", 0, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::methods", NsfClassInfoMethodsMethodStub, 5, { - {"-methodtype", 0, 1, convertToMethodtype}, - {"-callprotection", 0, 1, convertToCallprotection}, - {"-nomixins", 0, 0, convertToString}, - {"-incontext", 0, 0, convertToString}, - {"pattern", 0, 0, convertToString}} + {"-methodtype", 0, 1, ConvertToMethodtype}, + {"-callprotection", 0, 1, ConvertToCallprotection}, + {"-nomixins", 0, 0, ConvertToString}, + {"-incontext", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::mixinof", NsfClassInfoMixinOfMethodStub, 3, { - {"-closure", 0, 0, convertToString}, - {"-scope", 0, 1, convertToScope}, - {"pattern", 0, 0, convertToObjpattern}} + {"-closure", 0, 0, ConvertToString}, + {"-scope", 0, 1, ConvertToScope}, + {"pattern", 0, 0, ConvertToObjpattern}} }, {"::nsf::cmd::ClassInfo::mixinclasses", NsfClassInfoMixinclassesMethodStub, 3, { - {"-closure", 0, 0, convertToString}, - {"-guards", 0, 0, convertToString}, - {"pattern", 0, 0, convertToObjpattern}} + {"-closure", 0, 0, ConvertToString}, + {"-guards", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToObjpattern}} }, {"::nsf::cmd::ClassInfo::mixinguard", NsfClassInfoMixinguardMethodStub, 1, { - {"mixin", 1, 0, convertToString}} + {"mixin", 1, 0, ConvertToString}} }, {"::nsf::cmd::ClassInfo::slots", NsfClassInfoSlotsMethodStub, 0, { } }, {"::nsf::cmd::ClassInfo::subclass", NsfClassInfoSubclassMethodStub, 2, { - {"-closure", 0, 0, convertToString}, - {"pattern", 0, 0, convertToObjpattern}} + {"-closure", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToObjpattern}} }, {"::nsf::cmd::ClassInfo::superclass", NsfClassInfoSuperclassMethodStub, 2, { - {"-closure", 0, 0, convertToString}, - {"pattern", 0, 0, convertToTclobj}} + {"-closure", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToTclobj}} }, {"::nsf::alias", NsfAliasCmdStub, 6, { - {"object", 0, 0, convertToObject}, - {"-per-object", 0, 0, convertToString}, - {"methodName", 0, 0, convertToString}, - {"-nonleaf", 0, 0, convertToString}, - {"-objscope", 0, 0, convertToString}, - {"cmdName", 1, 0, convertToTclobj}} + {"object", 0, 0, ConvertToObject}, + {"-per-object", 0, 0, ConvertToString}, + {"methodName", 0, 0, ConvertToString}, + {"-nonleaf", 0, 0, ConvertToString}, + {"-objscope", 0, 0, ConvertToString}, + {"cmdName", 1, 0, ConvertToTclobj}} }, {"::nsf::assertion", NsfAssertionCmdStub, 3, { - {"object", 0, 0, convertToObject}, - {"assertionsubcmd", 1, 0, convertToAssertionsubcmd}, - {"arg", 0, 0, convertToTclobj}} + {"object", 0, 0, ConvertToObject}, + {"assertionsubcmd", 1, 0, ConvertToAssertionsubcmd}, + {"arg", 0, 0, ConvertToTclobj}} }, {"::nsf::colon", NsfColonCmdStub, 1, { - {"args", 0, 0, convertToNothing}} + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::configure", NsfConfigureCmdStub, 2, { - {"configureoption", 1, 0, convertToConfigureoption}, - {"value", 0, 0, convertToTclobj}} + {"configureoption", 1, 0, ConvertToConfigureoption}, + {"value", 0, 0, ConvertToTclobj}} }, {"::nsf::createobjectsystem", NsfCreateObjectSystemCmdStub, 3, { - {"rootClass", 1, 0, convertToTclobj}, - {"rootMetaClass", 1, 0, convertToTclobj}, - {"systemMethods", 0, 0, convertToTclobj}} + {"rootClass", 1, 0, ConvertToTclobj}, + {"rootMetaClass", 1, 0, ConvertToTclobj}, + {"systemMethods", 0, 0, ConvertToTclobj}} }, {"::nsf::current", NsfCurrentCmdStub, 1, { - {"currentoption", 0, 0, convertToCurrentoption}} + {"currentoption", 0, 0, ConvertToCurrentoption}} }, {"::nsf::deprecated", NsfDeprecatedCmdStub, 3, { - {"what", 1, 0, convertToString}, - {"oldCmd", 1, 0, convertToString}, - {"newCmd", 0, 0, convertToString}} + {"what", 1, 0, ConvertToString}, + {"oldCmd", 1, 0, ConvertToString}, + {"newCmd", 0, 0, ConvertToString}} }, {"::nsf::dispatch", NsfDispatchCmdStub, 4, { - {"object", 1, 0, convertToObject}, - {"-objscope", 0, 0, convertToString}, - {"command", 1, 0, convertToTclobj}, - {"args", 0, 0, convertToNothing}} + {"object", 1, 0, ConvertToObject}, + {"-objscope", 0, 0, ConvertToString}, + {"command", 1, 0, ConvertToTclobj}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::existsvar", NsfExistsVarCmdStub, 2, { - {"object", 1, 0, convertToObject}, - {"var", 1, 0, convertToString}} + {"object", 1, 0, ConvertToObject}, + {"var", 1, 0, ConvertToString}} }, {"::nsf::finalize", NsfFinalizeObjCmdStub, 0, { } }, {"::nsf::forward", NsfForwardCmdStub, 11, { - {"object", 1, 0, convertToObject}, - {"-per-object", 0, 0, convertToString}, - {"method", 1, 0, convertToTclobj}, - {"-default", 0, 1, convertToTclobj}, - {"-earlybinding", 0, 0, convertToString}, - {"-methodprefix", 0, 1, convertToTclobj}, - {"-objscope", 0, 0, convertToString}, - {"-onerror", 0, 1, convertToTclobj}, - {"-verbose", 0, 0, convertToString}, - {"target", 0, 0, convertToTclobj}, - {"args", 0, 0, convertToNothing}} + {"object", 1, 0, ConvertToObject}, + {"-per-object", 0, 0, ConvertToString}, + {"method", 1, 0, ConvertToTclobj}, + {"-default", 0, 1, ConvertToTclobj}, + {"-earlybinding", 0, 0, ConvertToString}, + {"-methodprefix", 0, 1, ConvertToTclobj}, + {"-objscope", 0, 0, ConvertToString}, + {"-onerror", 0, 1, ConvertToTclobj}, + {"-verbose", 0, 0, ConvertToString}, + {"target", 0, 0, ConvertToTclobj}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::importvar", NsfImportvarCmdStub, 2, { - {"object", 0, 0, convertToObject}, - {"args", 0, 0, convertToNothing}} + {"object", 0, 0, ConvertToObject}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::interp", NsfInterpObjCmdStub, 2, { - {"name", 0, 0, convertToString}, - {"args", 0, 0, convertToNothing}} + {"name", 0, 0, ConvertToString}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::invalidateobjectparameter", NsfInvalidateObjectParameterCmdStub, 1, { - {"class", 0, 0, convertToClass}} + {"class", 0, 0, ConvertToClass}} }, {"::nsf::is", NsfIsCmdStub, 3, { - {"-complain", 0, 0, convertToString}, - {"constraint", 1, 0, convertToTclobj}, - {"value", 1, 0, convertToTclobj}} + {"-complain", 0, 0, ConvertToString}, + {"constraint", 1, 0, ConvertToTclobj}, + {"value", 1, 0, ConvertToTclobj}} }, {"::nsf::isobject", NsfIsObjectCmdStub, 1, { - {"object", 1, 0, convertToTclobj}} + {"object", 1, 0, ConvertToTclobj}} }, {"::nsf::method", NsfMethodCmdStub, 9, { - {"object", 1, 0, convertToObject}, - {"-inner-namespace", 0, 0, convertToString}, - {"-per-object", 0, 0, convertToString}, - {"-public", 0, 0, convertToString}, - {"name", 1, 0, convertToTclobj}, - {"args", 1, 0, convertToTclobj}, - {"body", 1, 0, convertToTclobj}, - {"-precondition", 0, 1, convertToTclobj}, - {"-postcondition", 0, 1, convertToTclobj}} + {"object", 1, 0, ConvertToObject}, + {"-inner-namespace", 0, 0, ConvertToString}, + {"-per-object", 0, 0, ConvertToString}, + {"-public", 0, 0, ConvertToString}, + {"name", 1, 0, ConvertToTclobj}, + {"args", 1, 0, ConvertToTclobj}, + {"body", 1, 0, ConvertToTclobj}, + {"-precondition", 0, 1, ConvertToTclobj}, + {"-postcondition", 0, 1, ConvertToTclobj}} }, {"::nsf::methodproperty", NsfMethodPropertyCmdStub, 5, { - {"object", 1, 0, convertToObject}, - {"-per-object", 0, 0, convertToString}, - {"methodName", 1, 0, convertToTclobj}, - {"methodproperty", 1, 0, convertToMethodproperty}, - {"value", 0, 0, convertToTclobj}} + {"object", 1, 0, ConvertToObject}, + {"-per-object", 0, 0, ConvertToString}, + {"methodName", 1, 0, ConvertToTclobj}, + {"methodproperty", 1, 0, ConvertToMethodproperty}, + {"value", 0, 0, ConvertToTclobj}} }, {"::nsf::my", NsfMyCmdStub, 3, { - {"-local", 0, 0, convertToString}, - {"method", 1, 0, convertToTclobj}, - {"args", 0, 0, convertToNothing}} + {"-local", 0, 0, ConvertToString}, + {"method", 1, 0, ConvertToTclobj}, + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::namespace_copycmds", NsfNSCopyCmdsStub, 2, { - {"fromNs", 1, 0, convertToTclobj}, - {"toNs", 1, 0, convertToTclobj}} + {"fromNs", 1, 0, ConvertToTclobj}, + {"toNs", 1, 0, ConvertToTclobj}} }, {"::nsf::namespace_copyvars", NsfNSCopyVarsStub, 2, { - {"fromNs", 1, 0, convertToTclobj}, - {"toNs", 1, 0, convertToTclobj}} + {"fromNs", 1, 0, ConvertToTclobj}, + {"toNs", 1, 0, ConvertToTclobj}} }, {"::nsf::__qualify", NsfQualifyObjCmdStub, 1, { - {"name", 1, 0, convertToTclobj}} + {"name", 1, 0, ConvertToTclobj}} }, {"::nsf::relation", NsfRelationCmdStub, 3, { - {"object", 0, 0, convertToObject}, - {"relationtype", 1, 0, convertToRelationtype}, - {"value", 0, 0, convertToTclobj}} + {"object", 0, 0, ConvertToObject}, + {"relationtype", 1, 0, ConvertToRelationtype}, + {"value", 0, 0, ConvertToTclobj}} }, {"::nsf::setvar", NsfSetVarCmdStub, 3, { - {"object", 1, 0, convertToObject}, - {"variable", 1, 0, convertToTclobj}, - {"value", 0, 0, convertToTclobj}} + {"object", 1, 0, ConvertToObject}, + {"variable", 1, 0, ConvertToTclobj}, + {"value", 0, 0, ConvertToTclobj}} }, {"::nsf::setter", NsfSetterCmdStub, 3, { - {"object", 1, 0, convertToObject}, - {"-per-object", 0, 0, convertToString}, - {"parameter", 0, 0, convertToTclobj}} + {"object", 1, 0, ConvertToObject}, + {"-per-object", 0, 0, ConvertToString}, + {"parameter", 0, 0, ConvertToTclobj}} }, {"::nsf::cmd::Object::autoname", NsfOAutonameMethodStub, 3, { - {"-instance", 0, 0, convertToString}, - {"-reset", 0, 0, convertToString}, - {"name", 1, 0, convertToTclobj}} + {"-instance", 0, 0, ConvertToString}, + {"-reset", 0, 0, ConvertToString}, + {"name", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Object::cleanup", NsfOCleanupMethodStub, 0, { } }, {"::nsf::cmd::Object::configure", NsfOConfigureMethodStub, 1, { - {"args", 0, 0, convertToNothing}} + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Object::destroy", NsfODestroyMethodStub, 0, { } }, {"::nsf::cmd::Object::exists", NsfOExistsMethodStub, 1, { - {"var", 1, 0, convertToString}} + {"var", 1, 0, ConvertToString}} }, {"::nsf::cmd::Object::filterguard", NsfOFilterGuardMethodStub, 2, { - {"filter", 1, 0, convertToString}, - {"guard", 1, 0, convertToTclobj}} + {"filter", 1, 0, ConvertToString}, + {"guard", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Object::instvar", NsfOInstVarMethodStub, 1, { - {"args", 0, 0, convertToNothing}} + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Object::mixinguard", NsfOMixinGuardMethodStub, 2, { - {"mixin", 1, 0, convertToString}, - {"guard", 1, 0, convertToTclobj}} + {"mixin", 1, 0, ConvertToString}, + {"guard", 1, 0, ConvertToTclobj}} }, {"::nsf::cmd::Object::noinit", NsfONoinitMethodStub, 0, { } @@ -2185,90 +2185,90 @@ } }, {"::nsf::cmd::Object::residualargs", NsfOResidualargsMethodStub, 1, { - {"args", 0, 0, convertToNothing}} + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Object::uplevel", NsfOUplevelMethodStub, 1, { - {"args", 0, 0, convertToNothing}} + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Object::upvar", NsfOUpvarMethodStub, 1, { - {"args", 0, 0, convertToNothing}} + {"args", 0, 0, ConvertToNothing}} }, {"::nsf::cmd::Object::volatile", NsfOVolatileMethodStub, 0, { } }, {"::nsf::cmd::Object::vwait", NsfOVwaitMethodStub, 1, { - {"varname", 1, 0, convertToString}} + {"varname", 1, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::callable", NsfObjInfoCallableMethodStub, 7, { - {"infocallablesubcmd", 1, 1, convertToInfocallablesubcmd}, - {"-methodtype", 0, 1, convertToMethodtype}, - {"-callprotection", 0, 1, convertToCallprotection}, - {"-application", 0, 0, convertToString}, - {"-nomixins", 0, 0, convertToString}, - {"-incontext", 0, 0, convertToString}, - {"pattern", 0, 0, convertToString}} + {"infocallablesubcmd", 1, 1, ConvertToInfocallablesubcmd}, + {"-methodtype", 0, 1, ConvertToMethodtype}, + {"-callprotection", 0, 1, ConvertToCallprotection}, + {"-application", 0, 0, ConvertToString}, + {"-nomixins", 0, 0, ConvertToString}, + {"-incontext", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::children", NsfObjInfoChildrenMethodStub, 1, { - {"pattern", 0, 0, convertToString}} + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::class", NsfObjInfoClassMethodStub, 0, { } }, {"::nsf::cmd::ObjectInfo::filterguard", NsfObjInfoFilterguardMethodStub, 1, { - {"filter", 1, 0, convertToString}} + {"filter", 1, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::filtermethods", NsfObjInfoFiltermethodsMethodStub, 3, { - {"-guards", 0, 0, convertToString}, - {"-order", 0, 0, convertToString}, - {"pattern", 0, 0, convertToString}} + {"-guards", 0, 0, ConvertToString}, + {"-order", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::forward", NsfObjInfoForwardMethodStub, 2, { - {"-definition", 0, 0, convertToString}, - {"name", 0, 0, convertToString}} + {"-definition", 0, 0, ConvertToString}, + {"name", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::hasmixin", NsfObjInfoHasMixinMethodStub, 1, { - {"class", 0, 0, convertToClass}} + {"class", 0, 0, ConvertToClass}} }, {"::nsf::cmd::ObjectInfo::hastype", NsfObjInfoHasTypeMethodStub, 1, { - {"class", 0, 0, convertToClass}} + {"class", 0, 0, ConvertToClass}} }, {"::nsf::cmd::ObjectInfo::hasnamespace", NsfObjInfoHasnamespaceMethodStub, 0, { } }, {"::nsf::cmd::ObjectInfo::is", NsfObjInfoIsMethodStub, 1, { - {"objectkind", 0, 0, convertToObjectkind}} + {"objectkind", 0, 0, ConvertToObjectkind}} }, {"::nsf::cmd::ObjectInfo::method", NsfObjInfoMethodMethodStub, 2, { - {"infomethodsubcmd", 0, 0, convertToInfomethodsubcmd}, - {"name", 0, 0, convertToString}} + {"infomethodsubcmd", 0, 0, ConvertToInfomethodsubcmd}, + {"name", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::methods", NsfObjInfoMethodsMethodStub, 5, { - {"-methodtype", 0, 1, convertToMethodtype}, - {"-callprotection", 0, 1, convertToCallprotection}, - {"-nomixins", 0, 0, convertToString}, - {"-incontext", 0, 0, convertToString}, - {"pattern", 0, 0, convertToString}} + {"-methodtype", 0, 1, ConvertToMethodtype}, + {"-callprotection", 0, 1, ConvertToCallprotection}, + {"-nomixins", 0, 0, ConvertToString}, + {"-incontext", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::mixinclasses", NsfObjInfoMixinclassesMethodStub, 3, { - {"-guards", 0, 0, convertToString}, - {"-order", 0, 0, convertToString}, - {"pattern", 0, 0, convertToObjpattern}} + {"-guards", 0, 0, ConvertToString}, + {"-order", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToObjpattern}} }, {"::nsf::cmd::ObjectInfo::mixinguard", NsfObjInfoMixinguardMethodStub, 1, { - {"mixin", 1, 0, convertToString}} + {"mixin", 1, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::parent", NsfObjInfoParentMethodStub, 0, { } }, {"::nsf::cmd::ObjectInfo::precedence", NsfObjInfoPrecedenceMethodStub, 2, { - {"-intrinsic", 0, 0, convertToString}, - {"pattern", 0, 0, convertToString}} + {"-intrinsic", 0, 0, ConvertToString}, + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::slotobjects", NsfObjInfoSlotObjectsMethodStub, 1, { - {"pattern", 0, 0, convertToString}} + {"pattern", 0, 0, ConvertToString}} }, {"::nsf::cmd::ObjectInfo::vars", NsfObjInfoVarsMethodStub, 1, { - {"pattern", 0, 0, convertToString}} + {"pattern", 0, 0, ConvertToString}} },{NULL} };