From a92c89854c280e193f5e738b3fe6916050aecdee Mon Sep 17 00:00:00 2001 From: nishi Date: Thu, 8 Feb 2024 15:01:17 +0000 Subject: [PATCH] forgot to format git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@184 d27a3e52-49c5-7645-884c-6793ebffc270 --- Example/tclw3/tclw3.c | 10 +++++----- Library/Tcl.c | 6 +++--- W3Version.h.p | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Example/tclw3/tclw3.c b/Example/tclw3/tclw3.c index 798bb0b..0279897 100644 --- a/Example/tclw3/tclw3.c +++ b/Example/tclw3/tclw3.c @@ -10,24 +10,24 @@ #include -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; diff --git a/Library/Tcl.c b/Library/Tcl.c index 4dacf06..9faf8da 100644 --- a/Library/Tcl.c +++ b/Library/Tcl.c @@ -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; diff --git a/W3Version.h.p b/W3Version.h.p index c989475..519bcc9 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.3E" \ +#define LIBW3_VERSION "2.3F" \ SUFFIX #ifdef __cplusplus -- 2.43.0