Fossil SCM
Fix more issues that were already fixed but overwritten by text editor errors and didn't get committed last time.
Commit
bd45dc72ddf470cf0a704c5ed8a6d2149b0e1abc601ff25b4813a345a1b1cdf2
Parent
b1711046d9ede06…
2 files changed
+4
-2
+2
-2
+4
-2
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -2049,11 +2049,11 @@ | ||
| 2049 | 2049 | res = Th_Eval(interp, 0, argv[2], TH1_LEN(argl[2])); |
| 2050 | 2050 | if( g.thTrace ){ |
| 2051 | 2051 | int nTrRes; |
| 2052 | 2052 | char *zTrRes = (char*)Th_GetResult(g.interp, &nTrRes); |
| 2053 | 2053 | Th_Trace("[query_eval] => %h {%#h}<br>\n", |
| 2054 | - Th_ReturnCodeName(res, 0), nTrRes, zTrRes); | |
| 2054 | + Th_ReturnCodeName(res, 0), TH1_LEN(nTrRes), zTrRes); | |
| 2055 | 2055 | } |
| 2056 | 2056 | if( res==TH_BREAK || res==TH_CONTINUE ) res = TH_OK; |
| 2057 | 2057 | } |
| 2058 | 2058 | rc = sqlite3_finalize(pStmt); |
| 2059 | 2059 | if( rc!=SQLITE_OK ){ |
| @@ -2763,10 +2763,11 @@ | ||
| 2763 | 2763 | char *zResult = (char*)Th_GetResult(g.interp, &nResult); |
| 2764 | 2764 | /* |
| 2765 | 2765 | ** Make sure that the TH1 script error was not caused by a "missing" |
| 2766 | 2766 | ** command hook handler as that is not actually an error condition. |
| 2767 | 2767 | */ |
| 2768 | + nResult = TH1_LEN(nResult); | |
| 2768 | 2769 | if( memcmp(zResult, NO_COMMAND_HOOK_ERROR, nResult)!=0 ){ |
| 2769 | 2770 | sendError(0,zResult, nResult, 0); |
| 2770 | 2771 | }else{ |
| 2771 | 2772 | /* |
| 2772 | 2773 | ** There is no command hook handler "installed". This situation |
| @@ -2850,10 +2851,11 @@ | ||
| 2850 | 2851 | char *zResult = (char*)Th_GetResult(g.interp, &nResult); |
| 2851 | 2852 | /* |
| 2852 | 2853 | ** Make sure that the TH1 script error was not caused by a "missing" |
| 2853 | 2854 | ** webpage hook handler as that is not actually an error condition. |
| 2854 | 2855 | */ |
| 2856 | + nResult = TH1_LEN(nResult); | |
| 2855 | 2857 | if( memcmp(zResult, NO_WEBPAGE_HOOK_ERROR, nResult)!=0 ){ |
| 2856 | 2858 | sendError(0,zResult, nResult, 1); |
| 2857 | 2859 | }else{ |
| 2858 | 2860 | /* |
| 2859 | 2861 | ** There is no webpage hook handler "installed". This situation |
| @@ -2990,11 +2992,11 @@ | ||
| 2990 | 2992 | rc = Th_Eval(g.interp, 0, (const char*)z, i); |
| 2991 | 2993 | if( g.thTrace ){ |
| 2992 | 2994 | int nTrRes; |
| 2993 | 2995 | char *zTrRes = (char*)Th_GetResult(g.interp, &nTrRes); |
| 2994 | 2996 | Th_Trace("[render_eval] => %h {%#h}<br>\n", |
| 2995 | - Th_ReturnCodeName(rc, 0), nTrRes, zTrRes); | |
| 2997 | + Th_ReturnCodeName(rc, 0), TH1_LEN(nTrRes), zTrRes); | |
| 2996 | 2998 | } |
| 2997 | 2999 | if( rc!=TH_OK ) break; |
| 2998 | 3000 | z += i; |
| 2999 | 3001 | if( z[0] ){ z += 6; } |
| 3000 | 3002 | i = 0; |
| 3001 | 3003 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -2049,11 +2049,11 @@ | |
| 2049 | res = Th_Eval(interp, 0, argv[2], TH1_LEN(argl[2])); |
| 2050 | if( g.thTrace ){ |
| 2051 | int nTrRes; |
| 2052 | char *zTrRes = (char*)Th_GetResult(g.interp, &nTrRes); |
| 2053 | Th_Trace("[query_eval] => %h {%#h}<br>\n", |
| 2054 | Th_ReturnCodeName(res, 0), nTrRes, zTrRes); |
| 2055 | } |
| 2056 | if( res==TH_BREAK || res==TH_CONTINUE ) res = TH_OK; |
| 2057 | } |
| 2058 | rc = sqlite3_finalize(pStmt); |
| 2059 | if( rc!=SQLITE_OK ){ |
| @@ -2763,10 +2763,11 @@ | |
| 2763 | char *zResult = (char*)Th_GetResult(g.interp, &nResult); |
| 2764 | /* |
| 2765 | ** Make sure that the TH1 script error was not caused by a "missing" |
| 2766 | ** command hook handler as that is not actually an error condition. |
| 2767 | */ |
| 2768 | if( memcmp(zResult, NO_COMMAND_HOOK_ERROR, nResult)!=0 ){ |
| 2769 | sendError(0,zResult, nResult, 0); |
| 2770 | }else{ |
| 2771 | /* |
| 2772 | ** There is no command hook handler "installed". This situation |
| @@ -2850,10 +2851,11 @@ | |
| 2850 | char *zResult = (char*)Th_GetResult(g.interp, &nResult); |
| 2851 | /* |
| 2852 | ** Make sure that the TH1 script error was not caused by a "missing" |
| 2853 | ** webpage hook handler as that is not actually an error condition. |
| 2854 | */ |
| 2855 | if( memcmp(zResult, NO_WEBPAGE_HOOK_ERROR, nResult)!=0 ){ |
| 2856 | sendError(0,zResult, nResult, 1); |
| 2857 | }else{ |
| 2858 | /* |
| 2859 | ** There is no webpage hook handler "installed". This situation |
| @@ -2990,11 +2992,11 @@ | |
| 2990 | rc = Th_Eval(g.interp, 0, (const char*)z, i); |
| 2991 | if( g.thTrace ){ |
| 2992 | int nTrRes; |
| 2993 | char *zTrRes = (char*)Th_GetResult(g.interp, &nTrRes); |
| 2994 | Th_Trace("[render_eval] => %h {%#h}<br>\n", |
| 2995 | Th_ReturnCodeName(rc, 0), nTrRes, zTrRes); |
| 2996 | } |
| 2997 | if( rc!=TH_OK ) break; |
| 2998 | z += i; |
| 2999 | if( z[0] ){ z += 6; } |
| 3000 | i = 0; |
| 3001 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -2049,11 +2049,11 @@ | |
| 2049 | res = Th_Eval(interp, 0, argv[2], TH1_LEN(argl[2])); |
| 2050 | if( g.thTrace ){ |
| 2051 | int nTrRes; |
| 2052 | char *zTrRes = (char*)Th_GetResult(g.interp, &nTrRes); |
| 2053 | Th_Trace("[query_eval] => %h {%#h}<br>\n", |
| 2054 | Th_ReturnCodeName(res, 0), TH1_LEN(nTrRes), zTrRes); |
| 2055 | } |
| 2056 | if( res==TH_BREAK || res==TH_CONTINUE ) res = TH_OK; |
| 2057 | } |
| 2058 | rc = sqlite3_finalize(pStmt); |
| 2059 | if( rc!=SQLITE_OK ){ |
| @@ -2763,10 +2763,11 @@ | |
| 2763 | char *zResult = (char*)Th_GetResult(g.interp, &nResult); |
| 2764 | /* |
| 2765 | ** Make sure that the TH1 script error was not caused by a "missing" |
| 2766 | ** command hook handler as that is not actually an error condition. |
| 2767 | */ |
| 2768 | nResult = TH1_LEN(nResult); |
| 2769 | if( memcmp(zResult, NO_COMMAND_HOOK_ERROR, nResult)!=0 ){ |
| 2770 | sendError(0,zResult, nResult, 0); |
| 2771 | }else{ |
| 2772 | /* |
| 2773 | ** There is no command hook handler "installed". This situation |
| @@ -2850,10 +2851,11 @@ | |
| 2851 | char *zResult = (char*)Th_GetResult(g.interp, &nResult); |
| 2852 | /* |
| 2853 | ** Make sure that the TH1 script error was not caused by a "missing" |
| 2854 | ** webpage hook handler as that is not actually an error condition. |
| 2855 | */ |
| 2856 | nResult = TH1_LEN(nResult); |
| 2857 | if( memcmp(zResult, NO_WEBPAGE_HOOK_ERROR, nResult)!=0 ){ |
| 2858 | sendError(0,zResult, nResult, 1); |
| 2859 | }else{ |
| 2860 | /* |
| 2861 | ** There is no webpage hook handler "installed". This situation |
| @@ -2990,11 +2992,11 @@ | |
| 2992 | rc = Th_Eval(g.interp, 0, (const char*)z, i); |
| 2993 | if( g.thTrace ){ |
| 2994 | int nTrRes; |
| 2995 | char *zTrRes = (char*)Th_GetResult(g.interp, &nTrRes); |
| 2996 | Th_Trace("[render_eval] => %h {%#h}<br>\n", |
| 2997 | Th_ReturnCodeName(rc, 0), TH1_LEN(nTrRes), zTrRes); |
| 2998 | } |
| 2999 | if( rc!=TH_OK ) break; |
| 3000 | z += i; |
| 3001 | if( z[0] ){ z += 6; } |
| 3002 | i = 0; |
| 3003 |
+2
-2
| --- src/th_tcl.c | ||
| +++ src/th_tcl.c | ||
| @@ -782,11 +782,11 @@ | ||
| 782 | 782 | return TCL_ERROR; |
| 783 | 783 | } |
| 784 | 784 | arg = Tcl_GetStringFromObj(objv[1], &nArg); |
| 785 | 785 | rc = Th_Eval(th1Interp, 0, arg, nArg); |
| 786 | 786 | arg = Th_GetResult(th1Interp, &nArg); |
| 787 | - Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg)); | |
| 787 | + Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, TH1_LEN(nArg))); | |
| 788 | 788 | return getTclReturnCode(rc); |
| 789 | 789 | } |
| 790 | 790 | |
| 791 | 791 | /* |
| 792 | 792 | ** Tcl command: th1Expr arg |
| @@ -815,11 +815,11 @@ | ||
| 815 | 815 | return TCL_ERROR; |
| 816 | 816 | } |
| 817 | 817 | arg = Tcl_GetStringFromObj(objv[1], &nArg); |
| 818 | 818 | rc = Th_Expr(th1Interp, arg, nArg); |
| 819 | 819 | arg = Th_GetResult(th1Interp, &nArg); |
| 820 | - Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg)); | |
| 820 | + Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, TH1_LEN(nArg))); | |
| 821 | 821 | return getTclReturnCode(rc); |
| 822 | 822 | } |
| 823 | 823 | |
| 824 | 824 | /* |
| 825 | 825 | ** Array of Tcl integration commands. Used when adding or removing the Tcl |
| 826 | 826 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -782,11 +782,11 @@ | |
| 782 | return TCL_ERROR; |
| 783 | } |
| 784 | arg = Tcl_GetStringFromObj(objv[1], &nArg); |
| 785 | rc = Th_Eval(th1Interp, 0, arg, nArg); |
| 786 | arg = Th_GetResult(th1Interp, &nArg); |
| 787 | Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg)); |
| 788 | return getTclReturnCode(rc); |
| 789 | } |
| 790 | |
| 791 | /* |
| 792 | ** Tcl command: th1Expr arg |
| @@ -815,11 +815,11 @@ | |
| 815 | return TCL_ERROR; |
| 816 | } |
| 817 | arg = Tcl_GetStringFromObj(objv[1], &nArg); |
| 818 | rc = Th_Expr(th1Interp, arg, nArg); |
| 819 | arg = Th_GetResult(th1Interp, &nArg); |
| 820 | Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, nArg)); |
| 821 | return getTclReturnCode(rc); |
| 822 | } |
| 823 | |
| 824 | /* |
| 825 | ** Array of Tcl integration commands. Used when adding or removing the Tcl |
| 826 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -782,11 +782,11 @@ | |
| 782 | return TCL_ERROR; |
| 783 | } |
| 784 | arg = Tcl_GetStringFromObj(objv[1], &nArg); |
| 785 | rc = Th_Eval(th1Interp, 0, arg, nArg); |
| 786 | arg = Th_GetResult(th1Interp, &nArg); |
| 787 | Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, TH1_LEN(nArg))); |
| 788 | return getTclReturnCode(rc); |
| 789 | } |
| 790 | |
| 791 | /* |
| 792 | ** Tcl command: th1Expr arg |
| @@ -815,11 +815,11 @@ | |
| 815 | return TCL_ERROR; |
| 816 | } |
| 817 | arg = Tcl_GetStringFromObj(objv[1], &nArg); |
| 818 | rc = Th_Expr(th1Interp, arg, nArg); |
| 819 | arg = Th_GetResult(th1Interp, &nArg); |
| 820 | Tcl_SetObjResult(interp, Tcl_NewStringObj(arg, TH1_LEN(nArg))); |
| 821 | return getTclReturnCode(rc); |
| 822 | } |
| 823 | |
| 824 | /* |
| 825 | ** Array of Tcl integration commands. Used when adding or removing the Tcl |
| 826 |