Fossil SCM

Make sure that Tcl integration related script errors have consistent casing.

mistachkin 2012-10-21 19:07 trunk
Commit d769ee702b59da6e630619a6fd2e55f60f7a8352
1 file changed +8 -8
+8 -8
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -217,11 +217,11 @@
217217
struct TclContext *tclContext = (struct TclContext *)ctx;
218218
tcl_NotifyProc *xNotifyProc;
219219
220220
if ( !tclContext ){
221221
Th_ErrorMessage(interp,
222
- "Invalid Tcl context", (const char *)"", 0);
222
+ "invalid Tcl context", (const char *)"", 0);
223223
return TH_ERROR;
224224
}
225225
xNotifyProc = bIsPost ? tclContext->xPostEval : tclContext->xPreEval;
226226
if ( xNotifyProc ){
227227
rc = xNotifyProc(bIsPost ?
@@ -397,11 +397,11 @@
397397
Tcl_DecrRefCount(objPtr);
398398
Tcl_Release((ClientData)tclInterp);
399399
return TH_ERROR;
400400
}
401401
if( !cmdInfo.objProc ){
402
- Th_ErrorMessage(interp, "Cannot invoke Tcl command:", argv[1], argl[1]);
402
+ Th_ErrorMessage(interp, "cannot invoke Tcl command:", argv[1], argl[1]);
403403
Tcl_DecrRefCount(objPtr);
404404
Tcl_Release((ClientData)tclInterp);
405405
return TH_ERROR;
406406
}
407407
Tcl_DecrRefCount(objPtr);
@@ -533,11 +533,11 @@
533533
#if defined(USE_TCL_STUBS)
534534
char fileName[] = TCL_LIBRARY_NAME;
535535
#endif
536536
if( !pLibrary || !pxFindExecutable || !pxCreateInterp ){
537537
Th_ErrorMessage(interp,
538
- "Invalid Tcl loader argument(s)", (const char *)"", 0);
538
+ "invalid Tcl loader argument(s)", (const char *)"", 0);
539539
return TH_ERROR;
540540
}
541541
#if defined(USE_TCL_STUBS)
542542
do {
543543
void *library = dlopen(fileName, RTLD_NOW | RTLD_GLOBAL);
@@ -549,11 +549,11 @@
549549
if( !xFindExecutable ){
550550
xFindExecutable = (tcl_FindExecutableProc *)dlsym(library, procName);
551551
}
552552
if( !xFindExecutable ){
553553
Th_ErrorMessage(interp,
554
- "Could not locate Tcl_FindExecutable", (const char *)"", 0);
554
+ "could not locate Tcl_FindExecutable", (const char *)"", 0);
555555
dlclose(library);
556556
return TH_ERROR;
557557
}
558558
procName = TCL_CREATEINTERP_NAME;
559559
xCreateInterp = (tcl_CreateInterpProc *)dlsym(library, procName + 1);
@@ -560,11 +560,11 @@
560560
if( !xCreateInterp ){
561561
xCreateInterp = (tcl_CreateInterpProc *)dlsym(library, procName);
562562
}
563563
if( !xCreateInterp ){
564564
Th_ErrorMessage(interp,
565
- "Could not locate Tcl_CreateInterp", (const char *)"", 0);
565
+ "could not locate Tcl_CreateInterp", (const char *)"", 0);
566566
dlclose(library);
567567
return TH_ERROR;
568568
}
569569
*pLibrary = library;
570570
*pxFindExecutable = xFindExecutable;
@@ -571,11 +571,11 @@
571571
*pxCreateInterp = xCreateInterp;
572572
return TH_OK;
573573
}
574574
} while( --fileName[TCL_MINOR_OFFSET]>'3' ); /* Tcl 8.4+ */
575575
Th_ErrorMessage(interp,
576
- "Could not load Tcl shared library \"" TCL_LIBRARY_NAME "\"",
576
+ "could not load Tcl shared library \"" TCL_LIBRARY_NAME "\"",
577577
(const char *)"", 0);
578578
return TH_ERROR;
579579
#else
580580
*pLibrary = 0;
581581
*pxFindExecutable = Tcl_FindExecutable;
@@ -656,11 +656,11 @@
656656
Tcl_Interp *tclInterp;
657657
char *setup;
658658
659659
if ( !tclContext ){
660660
Th_ErrorMessage(interp,
661
- "Invalid Tcl context", (const char *)"", 0);
661
+ "invalid Tcl context", (const char *)"", 0);
662662
return TH_ERROR;
663663
}
664664
if ( tclContext->interp ){
665665
return TH_OK;
666666
}
@@ -679,11 +679,11 @@
679679
#if defined(USE_TCL_STUBS)
680680
!Tcl_InitStubs(tclInterp, "8.4", 0) ||
681681
#endif
682682
Tcl_InterpDeleted(tclInterp) ){
683683
Th_ErrorMessage(interp,
684
- "Could not create Tcl interpreter", (const char *)"", 0);
684
+ "could not create Tcl interpreter", (const char *)"", 0);
685685
return TH_ERROR;
686686
}
687687
tclContext->interp = tclInterp;
688688
if( Tcl_Init(tclInterp)!=TCL_OK ){
689689
Th_ErrorMessage(interp,
690690
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -217,11 +217,11 @@
217 struct TclContext *tclContext = (struct TclContext *)ctx;
218 tcl_NotifyProc *xNotifyProc;
219
220 if ( !tclContext ){
221 Th_ErrorMessage(interp,
222 "Invalid Tcl context", (const char *)"", 0);
223 return TH_ERROR;
224 }
225 xNotifyProc = bIsPost ? tclContext->xPostEval : tclContext->xPreEval;
226 if ( xNotifyProc ){
227 rc = xNotifyProc(bIsPost ?
@@ -397,11 +397,11 @@
397 Tcl_DecrRefCount(objPtr);
398 Tcl_Release((ClientData)tclInterp);
399 return TH_ERROR;
400 }
401 if( !cmdInfo.objProc ){
402 Th_ErrorMessage(interp, "Cannot invoke Tcl command:", argv[1], argl[1]);
403 Tcl_DecrRefCount(objPtr);
404 Tcl_Release((ClientData)tclInterp);
405 return TH_ERROR;
406 }
407 Tcl_DecrRefCount(objPtr);
@@ -533,11 +533,11 @@
533 #if defined(USE_TCL_STUBS)
534 char fileName[] = TCL_LIBRARY_NAME;
535 #endif
536 if( !pLibrary || !pxFindExecutable || !pxCreateInterp ){
537 Th_ErrorMessage(interp,
538 "Invalid Tcl loader argument(s)", (const char *)"", 0);
539 return TH_ERROR;
540 }
541 #if defined(USE_TCL_STUBS)
542 do {
543 void *library = dlopen(fileName, RTLD_NOW | RTLD_GLOBAL);
@@ -549,11 +549,11 @@
549 if( !xFindExecutable ){
550 xFindExecutable = (tcl_FindExecutableProc *)dlsym(library, procName);
551 }
552 if( !xFindExecutable ){
553 Th_ErrorMessage(interp,
554 "Could not locate Tcl_FindExecutable", (const char *)"", 0);
555 dlclose(library);
556 return TH_ERROR;
557 }
558 procName = TCL_CREATEINTERP_NAME;
559 xCreateInterp = (tcl_CreateInterpProc *)dlsym(library, procName + 1);
@@ -560,11 +560,11 @@
560 if( !xCreateInterp ){
561 xCreateInterp = (tcl_CreateInterpProc *)dlsym(library, procName);
562 }
563 if( !xCreateInterp ){
564 Th_ErrorMessage(interp,
565 "Could not locate Tcl_CreateInterp", (const char *)"", 0);
566 dlclose(library);
567 return TH_ERROR;
568 }
569 *pLibrary = library;
570 *pxFindExecutable = xFindExecutable;
@@ -571,11 +571,11 @@
571 *pxCreateInterp = xCreateInterp;
572 return TH_OK;
573 }
574 } while( --fileName[TCL_MINOR_OFFSET]>'3' ); /* Tcl 8.4+ */
575 Th_ErrorMessage(interp,
576 "Could not load Tcl shared library \"" TCL_LIBRARY_NAME "\"",
577 (const char *)"", 0);
578 return TH_ERROR;
579 #else
580 *pLibrary = 0;
581 *pxFindExecutable = Tcl_FindExecutable;
@@ -656,11 +656,11 @@
656 Tcl_Interp *tclInterp;
657 char *setup;
658
659 if ( !tclContext ){
660 Th_ErrorMessage(interp,
661 "Invalid Tcl context", (const char *)"", 0);
662 return TH_ERROR;
663 }
664 if ( tclContext->interp ){
665 return TH_OK;
666 }
@@ -679,11 +679,11 @@
679 #if defined(USE_TCL_STUBS)
680 !Tcl_InitStubs(tclInterp, "8.4", 0) ||
681 #endif
682 Tcl_InterpDeleted(tclInterp) ){
683 Th_ErrorMessage(interp,
684 "Could not create Tcl interpreter", (const char *)"", 0);
685 return TH_ERROR;
686 }
687 tclContext->interp = tclInterp;
688 if( Tcl_Init(tclInterp)!=TCL_OK ){
689 Th_ErrorMessage(interp,
690
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -217,11 +217,11 @@
217 struct TclContext *tclContext = (struct TclContext *)ctx;
218 tcl_NotifyProc *xNotifyProc;
219
220 if ( !tclContext ){
221 Th_ErrorMessage(interp,
222 "invalid Tcl context", (const char *)"", 0);
223 return TH_ERROR;
224 }
225 xNotifyProc = bIsPost ? tclContext->xPostEval : tclContext->xPreEval;
226 if ( xNotifyProc ){
227 rc = xNotifyProc(bIsPost ?
@@ -397,11 +397,11 @@
397 Tcl_DecrRefCount(objPtr);
398 Tcl_Release((ClientData)tclInterp);
399 return TH_ERROR;
400 }
401 if( !cmdInfo.objProc ){
402 Th_ErrorMessage(interp, "cannot invoke Tcl command:", argv[1], argl[1]);
403 Tcl_DecrRefCount(objPtr);
404 Tcl_Release((ClientData)tclInterp);
405 return TH_ERROR;
406 }
407 Tcl_DecrRefCount(objPtr);
@@ -533,11 +533,11 @@
533 #if defined(USE_TCL_STUBS)
534 char fileName[] = TCL_LIBRARY_NAME;
535 #endif
536 if( !pLibrary || !pxFindExecutable || !pxCreateInterp ){
537 Th_ErrorMessage(interp,
538 "invalid Tcl loader argument(s)", (const char *)"", 0);
539 return TH_ERROR;
540 }
541 #if defined(USE_TCL_STUBS)
542 do {
543 void *library = dlopen(fileName, RTLD_NOW | RTLD_GLOBAL);
@@ -549,11 +549,11 @@
549 if( !xFindExecutable ){
550 xFindExecutable = (tcl_FindExecutableProc *)dlsym(library, procName);
551 }
552 if( !xFindExecutable ){
553 Th_ErrorMessage(interp,
554 "could not locate Tcl_FindExecutable", (const char *)"", 0);
555 dlclose(library);
556 return TH_ERROR;
557 }
558 procName = TCL_CREATEINTERP_NAME;
559 xCreateInterp = (tcl_CreateInterpProc *)dlsym(library, procName + 1);
@@ -560,11 +560,11 @@
560 if( !xCreateInterp ){
561 xCreateInterp = (tcl_CreateInterpProc *)dlsym(library, procName);
562 }
563 if( !xCreateInterp ){
564 Th_ErrorMessage(interp,
565 "could not locate Tcl_CreateInterp", (const char *)"", 0);
566 dlclose(library);
567 return TH_ERROR;
568 }
569 *pLibrary = library;
570 *pxFindExecutable = xFindExecutable;
@@ -571,11 +571,11 @@
571 *pxCreateInterp = xCreateInterp;
572 return TH_OK;
573 }
574 } while( --fileName[TCL_MINOR_OFFSET]>'3' ); /* Tcl 8.4+ */
575 Th_ErrorMessage(interp,
576 "could not load Tcl shared library \"" TCL_LIBRARY_NAME "\"",
577 (const char *)"", 0);
578 return TH_ERROR;
579 #else
580 *pLibrary = 0;
581 *pxFindExecutable = Tcl_FindExecutable;
@@ -656,11 +656,11 @@
656 Tcl_Interp *tclInterp;
657 char *setup;
658
659 if ( !tclContext ){
660 Th_ErrorMessage(interp,
661 "invalid Tcl context", (const char *)"", 0);
662 return TH_ERROR;
663 }
664 if ( tclContext->interp ){
665 return TH_OK;
666 }
@@ -679,11 +679,11 @@
679 #if defined(USE_TCL_STUBS)
680 !Tcl_InitStubs(tclInterp, "8.4", 0) ||
681 #endif
682 Tcl_InterpDeleted(tclInterp) ){
683 Th_ErrorMessage(interp,
684 "could not create Tcl interpreter", (const char *)"", 0);
685 return TH_ERROR;
686 }
687 tclContext->interp = tclInterp;
688 if( Tcl_Init(tclInterp)!=TCL_OK ){
689 Th_ErrorMessage(interp,
690

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button