Index: mk4tcl.cpp =================================================================== RCS file: /home/cvs/metakit/tcl/mk4tcl.cpp,v retrieving revision 1.63 diff -u -r1.63 mk4tcl.cpp --- mk4tcl.cpp 5 Sep 2005 10:02:30 -0000 1.63 +++ mk4tcl.cpp 6 Sep 2005 16:08:12 -0000 @@ -474,7 +474,7 @@ break; default: - Tcl_SetResult(interp, "unsupported property type", TCL_STATIC); + Tcl_SetResult(interp, (char*) "unsupported property type", TCL_STATIC); e = TCL_ERROR; } @@ -1015,7 +1015,7 @@ static Tcl_ObjType mkPropertyType = { - "mkProperty", // name + (char*) "mkProperty", // name FreePropertyInternalRep, // freeIntRepProc DupPropertyInternalRep, // dupIntRepProc UpdateStringOfProperty, // updateStringProc @@ -1080,7 +1080,7 @@ static Tcl_ObjType mkCursorType = { - "mkCursor", // name + (char*) "mkCursor", // name FreeCursorInternalRep, // freeIntRepProc DupCursorInternalRep, // dupIntRepProc UpdateStringOfCursor, // updateStringProc @@ -1461,7 +1461,7 @@ return value; } -int Tcl::tcl_GetIndexFromObj(Tcl_Obj *obj_, const char **table_, char *msg_) +int Tcl::tcl_GetIndexFromObj(Tcl_Obj *obj_, const char **table_, const char *msg_) { int index = -1; if (!_error) @@ -1522,7 +1522,7 @@ if (self == 0 || self->interp != ip) { - Tcl_SetResult(ip, "Initialization error in dispatcher", TCL_STATIC); + Tcl_SetResult(ip, (char*) "Initialization error in dispatcher", TCL_STATIC); return TCL_ERROR; } @@ -2541,7 +2541,7 @@ c4_View v = Execute(statement); if (_error) { - Tcl_SetResult(_interp, "execute failed", + Tcl_SetResult(_interp, (char*) "execute failed", TCL_STATIC); return TCL_ERROR; } @@ -2612,7 +2612,6 @@ { struct CmdDef { - int (MkTcl::*proc)(); int min; int max; const char* desc; @@ -2620,20 +2619,19 @@ static CmdDef defTab [] = { - // the "&MkTcl::" stuff is required for Mac cwpro2 - { &MkTcl::GetCmd, 2, 0, "get cursor ?prop ...?" }, - { &MkTcl::SetCmd, 3, 0, "set cursor prop ?value prop value ...?" }, - { &MkTcl::CursorCmd, 3, 5, "cursor option cursorname ?...?" }, - { &MkTcl::RowCmd, 2, 0, "row option ?cursor ...?" }, - { &MkTcl::ViewCmd, 2, 0, "view option view ?arg?" }, - { &MkTcl::FileCmd, 2, 6, "file option ?tag ...?" }, - { &MkTcl::LoopCmd, 3, 7, "loop cursor ?path first limit incr? {cmds}" }, - { &MkTcl::SelectCmd, 2, 0, "select path ?...?" }, - { &MkTcl::ChannelCmd, 3, 4, "channel path prop ?mode?" }, + { 2, 0, "get cursor ?prop ...?" }, + { 3, 0, "set cursor prop ?value prop value ...?" }, + { 3, 5, "cursor option cursorname ?...?" }, + { 2, 0, "row option ?cursor ...?" }, + { 2, 0, "view option view ?arg?" }, + { 2, 6, "file option ?tag ...?" }, + { 3, 7, "loop cursor ?path first limit incr? {cmds}" }, + { 2, 0, "select path ?...?" }, + { 3, 4, "channel path prop ?mode?" }, #if MKSQL - { &MkTcl::SqlAuxCmd, 3, 3, "cmd db" }, + { 3, 3, "cmd db" }, #endif - { 0, 0, 0, 0 }, + { 0, 0, 0 }, }; _error = TCL_OK; @@ -2653,7 +2651,21 @@ } Tcl_MutexLock(&mkMutex); - int result = (this->*cd.proc)(); + int result; + switch (id) { + case 0: result = GetCmd(); + case 1: result = SetCmd(); + case 2: result = CursorCmd(); + case 3: result = RowCmd(); + case 4: result = ViewCmd(); + case 5: result = FileCmd(); + case 6: result = LoopCmd(); + case 7: result = SelectCmd(); + case 8: result = ChannelCmd(); +#if MKSQL + case 9: result = SqlAuxCmd(); +#endif + } Tcl_MutexUnlock(&mkMutex); return result; } Index: mk4tcl.h =================================================================== RCS file: /home/cvs/metakit/tcl/mk4tcl.h,v retrieving revision 1.22 diff -u -r1.22 mk4tcl.h --- mk4tcl.h 29 Feb 2004 22:45:29 -0000 1.22 +++ mk4tcl.h 6 Sep 2005 16:08:12 -0000 @@ -348,7 +348,7 @@ int tcl_GetIntFromObj(Tcl_Obj* obj_); long tcl_GetLongFromObj(Tcl_Obj* obj_); double tcl_GetDoubleFromObj(Tcl_Obj* obj_); - int tcl_GetIndexFromObj(Tcl_Obj *obj_, const char **table_, char *msg_ ="option"); + int tcl_GetIndexFromObj(Tcl_Obj *obj_, const char **table_, const char *msg_ ="option"); long tcl_ExprLongObj(Tcl_Obj *obj_); Tcl_Obj* GetValue(const c4_RowRef& row_, const c4_Property& prop_, Tcl_Obj* obj_ =0);