]> Nishi Git Mirror - libw3.git/commitdiff
forgot to format
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Thu, 8 Feb 2024 15:01:17 +0000 (15:01 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Thu, 8 Feb 2024 15:01:17 +0000 (15:01 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@184 d27a3e52-49c5-7645-884c-6793ebffc270

Example/tclw3/tclw3.c
Library/Tcl.c
W3Version.h.p

index 798bb0b1d371e505be03d09aac9f93fae48fdf87..02798972b33c0d01d4df21280a9748159b838183 100644 (file)
 
 #include <stdio.h>
 
-int main(int argc, char** argv){
-       if(argc < 2){
+int main(int argc, char** argv) {
+       if(argc < 2) {
                fprintf(stderr, "Usage: %s filename\n", argv[0]);
                return 1;
        }
        Tcl_Interp* interp = Tcl_CreateInterp();
        Tcl_FindExecutable(argv[0]);
-       if(Tcl_Init(interp) == TCL_ERROR){
+       if(Tcl_Init(interp) == TCL_ERROR) {
                const char* errmsg = Tcl_GetStringResult(interp);
                fprintf(stderr, "Tcl error: %s\n", errmsg);
                return -1;
        }
-       if(W3_Init(interp) == TCL_ERROR){
+       if(W3_Init(interp) == TCL_ERROR) {
                const char* errmsg = Tcl_GetStringResult(interp);
                fprintf(stderr, "LibW3 error: %s\n", errmsg);
                return -1;
        }
-       if(Tcl_EvalFile(interp, argv[1]) == TCL_ERROR){
+       if(Tcl_EvalFile(interp, argv[1]) == TCL_ERROR) {
                const char* errmsg = Tcl_GetStringResult(interp);
                fprintf(stderr, "Tcl error: %s\n", errmsg);
                return -1;
index 4dacf068b633211e579a370b164cfe32cd73c17a..9faf8da4fbd0e304c9aedf2e8a99c1fe2efa08e1 100644 (file)
@@ -209,10 +209,10 @@ int Tcl_W3Cmd(ClientData dummy, Tcl_Interp* interp, int objc, Tcl_Obj* CONST obj
                        return TCL_ERROR;
                }
                char* name = Tcl_GetString(objv[2]);
-               if(__dictionary != NULL){
+               if(__dictionary != NULL) {
                        int i;
-                       for(i = 0; __dictionary[i] != NULL; i += 2){
-                               if(strcasecmp(__dictionary[i], name) == 0){
+                       for(i = 0; __dictionary[i] != NULL; i += 2) {
+                               if(strcasecmp(__dictionary[i], name) == 0) {
                                        const char* errmsg = "argument error: a client named that already exists";
                                        Tcl_SetObjResult(interp, Tcl_NewStringObj(errmsg, strlen(errmsg)));
                                        return TCL_ERROR;
index c98947522b3be514fb3863bde5ced9d99cf95e59..519bcc925724301a443ae7b15474755928e552b6 100644 (file)
@@ -6,7 +6,7 @@
 extern "C" {
 #endif
 
-#define LIBW3_VERSION "2.3E" \
+#define LIBW3_VERSION "2.3F" \
 SUFFIX
 
 #ifdef __cplusplus