]> Nishi Git Mirror - libw3.git/commitdiff
fixing the tcl binding
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Thu, 8 Feb 2024 15:22:37 +0000 (15:22 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Thu, 8 Feb 2024 15:22:37 +0000 (15:22 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@188 d27a3e52-49c5-7645-884c-6793ebffc270

Library/Tcl.c
W3Version.h.p

index 9faf8da4fbd0e304c9aedf2e8a99c1fe2efa08e1..7ebc6a1a610afe4420ce3f9471ed47c3ae2fbeb3 100644 (file)
@@ -389,6 +389,15 @@ int Tcl_W3Cmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj* CONST obj
                        const char* errmsg = "argument error: a client named that does not exist";
                        Tcl_SetObjResult(interp, Tcl_NewStringObj(errmsg, strlen(errmsg)));
                }
+       } else if(strcasecmp(subcommand, "debug") == 0) {
+               if(objc != 3) {
+                       const char* errmsg = "argument error: arguments should be \"w3 debug bool\"";
+                       Tcl_SetObjResult(interp, Tcl_NewStringObj(errmsg, strlen(errmsg)));
+                       return TCL_ERROR;
+               }
+               W3_Do_Debug(atoi(Tcl_GetString(argv[2]));
+               Tcl_SetObjResult(interp, Tcl_NewIntObj(0));
+               return TCL_OK;
        } else {
                const char* errmsg = "argument error: invalid subcommand";
                Tcl_SetObjResult(interp, Tcl_NewStringObj(errmsg, strlen(errmsg)));
index 76cefd23c99e8f8274cd7fb5e87e9ab29ee0c091..5bfe6ecf4cfecd337456e90de36fdbf8abcce548 100644 (file)
@@ -6,7 +6,7 @@
 extern "C" {
 #endif
 
-#define LIBW3_VERSION "2.4" \
+#define LIBW3_VERSION "2.4A" \
 SUFFIX
 
 #ifdef __cplusplus