summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h18
-rw-r--r--generic/tkBind.c4
-rw-r--r--generic/tkConfig.c21
-rw-r--r--generic/tkConsole.c12
-rw-r--r--generic/tkDecls.h3
-rw-r--r--generic/tkEntry.c16
-rw-r--r--generic/tkFont.c17
-rw-r--r--generic/tkGC.c7
-rw-r--r--generic/tkMenu.c2
-rw-r--r--generic/tkSelect.c2
-rw-r--r--generic/tkStubInit.c9
-rw-r--r--generic/tkTest.c4
-rw-r--r--generic/tkText.c86
-rw-r--r--generic/tkText.h2
-rw-r--r--generic/tkTextDisp.c8
-rw-r--r--generic/tkTextIndex.c18
-rw-r--r--generic/tkUtil.c2
-rw-r--r--generic/ttk/ttkClamTheme.c20
-rw-r--r--generic/ttk/ttkClassicTheme.c32
-rw-r--r--generic/ttk/ttkLabel.c14
-rw-r--r--generic/ttk/ttkManager.c2
-rw-r--r--generic/ttk/ttkManager.h2
-rw-r--r--generic/ttk/ttkProgress.c6
-rw-r--r--generic/ttk/ttkScale.c14
-rw-r--r--generic/ttk/ttkScrollbar.c6
-rw-r--r--generic/ttk/ttkSquare.c28
-rw-r--r--generic/ttk/ttkStubLib.c2
-rw-r--r--generic/ttk/ttkTagSet.c2
-rw-r--r--generic/ttk/ttkTrace.c2
-rw-r--r--generic/ttk/ttkWidget.h4
30 files changed, 227 insertions, 138 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 69a0858..9403f31 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,8 +17,8 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 6)
-# error Tk 8.6 must be compiled with tcl.h from Tcl 8.6 or better
+#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
+# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better
#endif
#ifndef CONST84
@@ -59,8 +59,8 @@ extern "C" {
* and update the version numbers:
*
* library/tk.tcl (1 LOC patch)
- * unix/configure.in (2 LOC Major, 2 LOC minor, 1 LOC patch)
- * win/configure.in (as above)
+ * unix/configure.ac (2 LOC Major, 2 LOC minor, 1 LOC patch)
+ * win/configure.ac (as above)
* README (sections 0 and 1)
* macosx/Tk-Common.xcconfig (not patchlevel) 1 LOC
* win/README (not patchlevel)
@@ -73,12 +73,12 @@ extern "C" {
*/
#define TK_MAJOR_VERSION 8
-#define TK_MINOR_VERSION 6
-#define TK_RELEASE_LEVEL TCL_FINAL_RELEASE
-#define TK_RELEASE_SERIAL 6
+#define TK_MINOR_VERSION 7
+#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
+#define TK_RELEASE_SERIAL 0
-#define TK_VERSION "8.6"
-#define TK_PATCH_LEVEL "8.6.6"
+#define TK_VERSION "8.7"
+#define TK_PATCH_LEVEL "8.7a0"
/*
* A special definition used to allow this header file to be included from
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 567c51f..8a6fc56 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -2878,7 +2878,7 @@ GetAllVirtualEvents(
* Any other fields in eventPtr which are not specified by the pattern
* string or the optional arguments, are set to 0.
*
- * The event may be handled sychronously or asynchronously, depending on
+ * The event may be handled synchronously or asynchronously, depending on
* the value specified by the optional "-when" option. The default
* setting is synchronous.
*
@@ -3959,7 +3959,7 @@ ParseEventDescription(
p = GetField(p, field, FIELD_SIZE);
}
if (*field != '\0') {
- if ((*field >= '1') && (*field <= '5') && (field[1] == '\0')) {
+ if ((*field >= '1') && (*field <= '9') && (field[1] == '\0')) {
if (eventFlags == 0) {
patPtr->eventType = ButtonPress;
eventMask = ButtonPressMask;
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 9c159e6..093bd35 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -91,7 +91,7 @@ typedef struct TkOption {
*/
typedef struct OptionTable {
- int refCount; /* Counts the number of uses of this table
+ size_t refCount; /* Counts the number of uses of this table
* (the number of times Tk_CreateOptionTable
* has returned it). This can be greater than
* 1 if it is shared along several option
@@ -103,7 +103,7 @@ typedef struct OptionTable {
* templates, this points to the table
* corresponding to the next template in the
* chain. */
- int numOptions; /* The number of items in the options array
+ size_t numOptions; /* The number of items in the options array
* below. */
Option options[1]; /* Information about the individual options in
* the table. This must be the last field in
@@ -177,7 +177,7 @@ Tk_CreateOptionTable(
OptionTable *tablePtr;
const Tk_OptionSpec *specPtr, *specPtr2;
Option *optionPtr;
- int numOptions, i;
+ size_t numOptions, i;
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -330,10 +330,9 @@ Tk_DeleteOptionTable(
{
OptionTable *tablePtr = (OptionTable *) optionTable;
Option *optionPtr;
- int count;
+ size_t count;
- tablePtr->refCount--;
- if (tablePtr->refCount > 0) {
+ if (tablePtr->refCount-- > 1) {
return;
}
@@ -978,7 +977,7 @@ GetOption(
Option *bestPtr, *optionPtr;
OptionTable *tablePtr2;
const char *p1, *p2;
- int count;
+ size_t count;
/*
* Search through all of the option tables in the chain to find the best
@@ -1539,7 +1538,7 @@ Tk_FreeConfigOptions(
{
OptionTable *tablePtr;
Option *optionPtr;
- int count;
+ size_t count;
Tcl_Obj **oldPtrPtr, *oldPtr;
char *oldInternalPtr;
const Tk_OptionSpec *specPtr;
@@ -1733,7 +1732,7 @@ Tk_GetOptionInfo(
Tcl_Obj *resultPtr;
OptionTable *tablePtr = (OptionTable *) optionTable;
Option *optionPtr;
- int count;
+ size_t count;
/*
* If information is only wanted for a single configuration spec, then
@@ -2096,9 +2095,9 @@ TkDebugConfig(
if (tablePtr == (OptionTable *) Tcl_GetHashValue(hashEntryPtr)) {
for ( ; tablePtr != NULL; tablePtr = tablePtr->nextPtr) {
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(tablePtr->refCount));
+ Tcl_NewWideIntObj(tablePtr->refCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewIntObj(tablePtr->numOptions));
+ Tcl_NewWideIntObj(tablePtr->numOptions));
Tcl_ListObjAppendElement(NULL, objPtr, Tcl_NewStringObj(
tablePtr->options[0].specPtr->optionName, -1));
}
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 8bfbe9b..fc60d5f 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -24,7 +24,7 @@
typedef struct ConsoleInfo {
Tcl_Interp *consoleInterp; /* Interpreter displaying the console. */
Tcl_Interp *interp; /* Interpreter controlled by console. */
- int refCount;
+ size_t refCount;
} ConsoleInfo;
/*
@@ -452,7 +452,7 @@ Tk_CreateConsoleWindow(
if (mainWindow) {
Tk_DeleteEventHandler(mainWindow, StructureNotifyMask,
ConsoleEventProc, info);
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
@@ -592,7 +592,7 @@ ConsoleClose(
ConsoleInfo *info = data->info;
if (info) {
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
/*
* Assuming the Tcl_Interp * fields must already be NULL.
*/
@@ -881,7 +881,7 @@ InterpDeleteProc(
Tcl_DeleteThreadExitHandler(DeleteConsoleInterp, info->consoleInterp);
info->consoleInterp = NULL;
}
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
@@ -912,7 +912,7 @@ ConsoleDeleteProc(
if (info->consoleInterp) {
Tcl_DeleteInterp(info->consoleInterp);
}
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
@@ -949,7 +949,7 @@ ConsoleEventProc(
Tcl_EvalEx(consoleInterp, "tk::ConsoleExit", -1, TCL_EVAL_GLOBAL);
}
- if (--info->refCount <= 0) {
+ if (info->refCount-- <= 1) {
ckfree(info);
}
}
diff --git a/generic/tkDecls.h b/generic/tkDecls.h
index 64c32cd..eaaaf6c 100644
--- a/generic/tkDecls.h
+++ b/generic/tkDecls.h
@@ -1721,6 +1721,9 @@ extern const TkStubs *tkStubsPtr;
#undef Tk_SafeInit
#undef Tk_CreateConsoleWindow
+#undef Tk_FreeXId
+#define Tk_FreeXId(display,xid)
+
#if defined(_WIN32) && defined(UNICODE)
# define Tk_MainEx Tk_MainExW
EXTERN void Tk_MainExW(int argc, wchar_t **argv,
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 9e25bed..acfdd31 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -1176,13 +1176,15 @@ ConfigureEntry(
if (entryPtr->type == TK_SPINBOX) {
if (sbPtr->fromValue > sbPtr->toValue) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj(
- "-to value must be greater than -from value",
- -1));
- Tcl_SetErrorCode(interp, "TK", "SPINBOX", "RANGE_SANITY",
- NULL);
- continue;
- }
+ /*
+ * Swap -from and -to values.
+ */
+
+ double tmpFromTo = sbPtr->fromValue;
+
+ sbPtr->fromValue = sbPtr->toValue;
+ sbPtr->toValue = tmpFromTo;
+ }
if (sbPtr->reqFormat && (oldFormat != sbPtr->reqFormat)) {
/*
diff --git a/generic/tkFont.c b/generic/tkFont.c
index bec8807..a00c627 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -41,7 +41,7 @@ typedef struct TkFontInfo {
*/
typedef struct NamedFont {
- int refCount; /* Number of users of named font. */
+ size_t refCount; /* Number of users of named font. */
int deletePending; /* Non-zero if font should be deleted when
* last reference goes away. */
TkFontAttributes fa; /* Desired attributes for named font. */
@@ -1434,8 +1434,7 @@ Tk_FreeFont(
*/
nfPtr = Tcl_GetHashValue(fontPtr->namedHashPtr);
- nfPtr->refCount--;
- if ((nfPtr->refCount == 0) && nfPtr->deletePending) {
+ if ((nfPtr->refCount-- <= 1) && nfPtr->deletePending) {
Tcl_DeleteHashEntry(fontPtr->namedHashPtr);
ckfree(nfPtr);
}
@@ -1715,15 +1714,11 @@ Tk_PostscriptFontName(
upper = 1;
}
src += TkUtfToUniChar(src, &ch);
- if (ch <= 0xffff) {
- if (upper) {
- ch = Tcl_UniCharToUpper(ch);
- upper = 0;
- } else {
- ch = Tcl_UniCharToLower(ch);
- }
- } else {
+ if (upper) {
+ ch = Tcl_UniCharToUpper(ch);
upper = 0;
+ } else {
+ ch = Tcl_UniCharToLower(ch);
}
dest += TkUniCharToUtf(ch, dest);
}
diff --git a/generic/tkGC.c b/generic/tkGC.c
index 5663ede..c424e30 100644
--- a/generic/tkGC.c
+++ b/generic/tkGC.c
@@ -314,7 +314,6 @@ Tk_FreeGC(
gcPtr = Tcl_GetHashValue(idHashPtr);
gcPtr->refCount--;
if (gcPtr->refCount == 0) {
- Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(idHashPtr);
@@ -351,12 +350,6 @@ TkGCCleanup(
entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) {
gcPtr = Tcl_GetHashValue(entryPtr);
- /*
- * This call is not needed, as it is only used on Unix to restore the
- * Id to the stack pool, and we don't want to use them anymore.
- * Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
- */
-
XFreeGC(gcPtr->display, gcPtr->gc);
Tcl_DeleteHashEntry(gcPtr->valueHashPtr);
Tcl_DeleteHashEntry(entryPtr);
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index d24516f..7f5389c 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -38,7 +38,7 @@
* implemented using menu clones. Menu clones are full menus in their own
* right; they have a Tk window and pathname associated with them; they have a
* TkMenu structure and array of entries. However, they are linked with the
- * original menu that they were cloned from. The reflect the attributes of the
+ * original menu that they were cloned from. They reflect the attributes of the
* original, or "master", menu. So if an item is added to a menu, and that
* menu has clones, then the item must be added to all of its clones also.
* Menus are cloned when a menu is torn-off or when a menu is assigned as a
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index ab9018a..74b3964 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -26,7 +26,7 @@ typedef struct {
int charOffset; /* The offset of the next char to retrieve. */
int byteOffset; /* The expected byte offset of the next
* chunk. */
- char buffer[TCL_UTF_MAX]; /* A buffer to hold part of a UTF character
+ char buffer[4]; /* A buffer to hold part of a UTF character
* that is split across chunks. */
char command[1]; /* Command to invoke. Actual space is
* allocated as large as necessary. This must
diff --git a/generic/tkStubInit.c b/generic/tkStubInit.c
index 9411c26..ffe7b75 100644
--- a/generic/tkStubInit.c
+++ b/generic/tkStubInit.c
@@ -38,6 +38,15 @@ MODULE_SCOPE const TkStubs tkStubs;
*/
#undef Tk_MainEx
+#undef Tk_FreeXId
+
+static void
+doNothing(void)
+{
+ /* dummy implementation, no need to do anything */
+}
+
+#define Tk_FreeXId ((void (*)(Display *, XID)) doNothing)
#ifdef _WIN32
diff --git a/generic/tkTest.c b/generic/tkTest.c
index fa9e073..faba89d 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -227,7 +227,7 @@ Tktest_Init(
{
static int initialized = 0;
- if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.6", 0) == NULL) {
return TCL_ERROR;
}
if (Tk_InitStubs(interp, TK_VERSION, 0) == NULL) {
@@ -239,7 +239,7 @@ Tktest_Init(
*/
if (Tcl_PkgProvideEx(interp, "Tktest", TK_PATCH_LEVEL, NULL) == TCL_ERROR) {
- return TCL_ERROR;
+ return TCL_ERROR;
}
Tcl_CreateObjCommand(interp, "square", SquareObjCmd, NULL, NULL);
diff --git a/generic/tkText.c b/generic/tkText.c
index 412a7f2..8ae17a5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -2774,6 +2774,9 @@ TextPushUndoAction(
{
TkUndoSubAtom *iAtom, *dAtom;
int canUndo, canRedo;
+ char lMarkName[20] = "tk::undoMarkL";
+ char rMarkName[20] = "tk::undoMarkR";
+ char stringUndoMarkId[7] = "";
/*
* Create the helpers.
@@ -2784,6 +2787,10 @@ TextPushUndoAction(
Tcl_Obj *markSet2InsertObj = NULL;
Tcl_Obj *insertCmdObj = Tcl_NewObj();
Tcl_Obj *deleteCmdObj = Tcl_NewObj();
+ Tcl_Obj *markSetLUndoMarkCmdObj = Tcl_NewObj();
+ Tcl_Obj *markSetRUndoMarkCmdObj = NULL;
+ Tcl_Obj *markGravityLUndoMarkCmdObj = Tcl_NewObj();
+ Tcl_Obj *markGravityRUndoMarkCmdObj = NULL;
/*
* Get the index positions.
@@ -2833,6 +2840,40 @@ TextPushUndoAction(
Tcl_ListObjAppendElement(NULL, deleteCmdObj, index1Obj);
Tcl_ListObjAppendElement(NULL, deleteCmdObj, index2Obj);
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj(Tk_PathName(textPtr->tkwin), -1));
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj("mark", 4));
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj("set", 3));
+ markSetRUndoMarkCmdObj = Tcl_DuplicateObj(markSetLUndoMarkCmdObj);
+ textPtr->sharedTextPtr->undoMarkId++;
+ sprintf(stringUndoMarkId, "%d", textPtr->sharedTextPtr->undoMarkId);
+ strcat(lMarkName, stringUndoMarkId);
+ strcat(rMarkName, stringUndoMarkId);
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
+ Tcl_NewStringObj(lMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markSetRUndoMarkCmdObj,
+ Tcl_NewStringObj(rMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj, index1Obj);
+ Tcl_ListObjAppendElement(NULL, markSetRUndoMarkCmdObj, index2Obj);
+
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj(Tk_PathName(textPtr->tkwin), -1));
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj("mark", 4));
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj("gravity", 7));
+ markGravityRUndoMarkCmdObj = Tcl_DuplicateObj(markGravityLUndoMarkCmdObj);
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj(lMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj,
+ Tcl_NewStringObj(rMarkName, -1));
+ Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj,
+ Tcl_NewStringObj("left", 4));
+ Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj,
+ Tcl_NewStringObj("right", 5));
+
/*
* Note: we don't wish to use textPtr->widgetCmd in these callbacks
* because if we delete the textPtr, but peers still exist, we will then
@@ -2850,11 +2891,19 @@ TextPushUndoAction(
insertCmdObj, NULL);
TkUndoMakeCmdSubAtom(NULL, markSet2InsertObj, iAtom);
TkUndoMakeCmdSubAtom(NULL, seeInsertObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetLUndoMarkCmdObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetRUndoMarkCmdObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityLUndoMarkCmdObj, iAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityRUndoMarkCmdObj, iAtom);
dAtom = TkUndoMakeSubAtom(&TextUndoRedoCallback, textPtr->sharedTextPtr,
deleteCmdObj, NULL);
TkUndoMakeCmdSubAtom(NULL, markSet1InsertObj, dAtom);
TkUndoMakeCmdSubAtom(NULL, seeInsertObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetLUndoMarkCmdObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markSetRUndoMarkCmdObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityLUndoMarkCmdObj, dAtom);
+ TkUndoMakeCmdSubAtom(NULL, markGravityRUndoMarkCmdObj, dAtom);
Tcl_DecrRefCount(seeInsertObj);
Tcl_DecrRefCount(index1Obj);
@@ -5069,6 +5118,8 @@ TextEditUndo(
TkText *textPtr) /* Overall information about text widget. */
{
int status;
+ Tcl_Obj *cmdObj;
+ int code;
if (!textPtr->sharedTextPtr->undo) {
return TCL_OK;
@@ -5092,6 +5143,22 @@ TextEditUndo(
}
textPtr->sharedTextPtr->undo = 1;
+ /*
+ * Convert undo/redo temporary marks set by TkUndoRevert() into
+ * indices left in the interp result.
+ */
+
+ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s",
+ Tk_PathName(textPtr->tkwin));
+ Tcl_IncrRefCount(cmdObj);
+ code = Tcl_EvalObjEx(textPtr->interp, cmdObj, TCL_EVAL_GLOBAL);
+ if (code != TCL_OK) {
+ Tcl_AddErrorInfo(textPtr->interp,
+ "\n (on undoing)");
+ Tcl_BackgroundException(textPtr->interp, code);
+ }
+ Tcl_DecrRefCount(cmdObj);
+
return status;
}
@@ -5117,6 +5184,8 @@ TextEditRedo(
TkText *textPtr) /* Overall information about text widget. */
{
int status;
+ Tcl_Obj *cmdObj;
+ int code;
if (!textPtr->sharedTextPtr->undo) {
return TCL_OK;
@@ -5139,6 +5208,23 @@ TextEditRedo(
textPtr->sharedTextPtr->dirtyMode = TK_TEXT_DIRTY_NORMAL;
}
textPtr->sharedTextPtr->undo = 1;
+
+ /*
+ * Convert undo/redo temporary marks set by TkUndoApply() into
+ * indices left in the interp result.
+ */
+
+ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s",
+ Tk_PathName(textPtr->tkwin));
+ Tcl_IncrRefCount(cmdObj);
+ code = Tcl_EvalObjEx(textPtr->interp, cmdObj, TCL_EVAL_GLOBAL);
+ if (code != TCL_OK) {
+ Tcl_AddErrorInfo(textPtr->interp,
+ "\n (on undoing)");
+ Tcl_BackgroundException(textPtr->interp, code);
+ }
+ Tcl_DecrRefCount(cmdObj);
+
return status;
}
diff --git a/generic/tkText.h b/generic/tkText.h
index 5d88784..430c96b 100644
--- a/generic/tkText.h
+++ b/generic/tkText.h
@@ -580,6 +580,8 @@ typedef struct TkSharedText {
* statements. */
int autoSeparators; /* Non-zero means the separators will be
* inserted automatically. */
+ int undoMarkId; /* Counts undo marks temporarily used during
+ undo and redo operations. */
int isDirty; /* Flag indicating the 'dirtyness' of the
* text widget. If the flag is not zero,
* unsaved modifications have been applied to
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 1be26c4..e984bb6 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -610,7 +610,7 @@ static void AsyncUpdateLineMetrics(ClientData clientData);
static void GenerateWidgetViewSyncEvent(TkText *textPtr, Bool InSync);
static void AsyncUpdateYScrollbar(ClientData clientData);
static int IsStartOfNotMergedLine(TkText *textPtr,
- CONST TkTextIndex *indexPtr);
+ const TkTextIndex *indexPtr);
/*
* Result values returned by TextGetScrollInfoObj:
@@ -6890,7 +6890,7 @@ FindDLine(
static int
IsStartOfNotMergedLine(
TkText *textPtr, /* Widget record for text widget. */
- CONST TkTextIndex *indexPtr) /* Index to check. */
+ const TkTextIndex *indexPtr) /* Index to check. */
{
TkTextIndex indexPtr2;
@@ -8981,13 +8981,13 @@ RemoveFromBaseChunk(
bciPtr = baseCharChunkPtr->clientData;
+#ifdef DEBUG_LAYOUT_WITH_BASE_CHUNKS
if ((ciPtr->baseOffset + ciPtr->numBytes)
!= Tcl_DStringLength(&bciPtr->baseChars)) {
-#ifdef DEBUG_LAYOUT_WITH_BASE_CHUNKS
fprintf(stderr,"RemoveFromBaseChunk called with wrong chunk "
"(not last)\n");
-#endif
}
+#endif
Tcl_DStringSetLength(&bciPtr->baseChars, ciPtr->baseOffset);
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index d227bd8..7aebc84 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -40,9 +40,9 @@ static const char * StartEnd(TkText *textPtr, const char *string,
static int GetIndex(Tcl_Interp *interp, TkSharedText *sharedPtr,
TkText *textPtr, const char *string,
TkTextIndex *indexPtr, int *canCachePtr);
-static int IndexCountBytesOrdered(CONST TkText *textPtr,
- CONST TkTextIndex *indexPtr1,
- CONST TkTextIndex *indexPtr2);
+static int IndexCountBytesOrdered(const TkText *textPtr,
+ const TkTextIndex *indexPtr1,
+ const TkTextIndex *indexPtr2);
/*
* The "textindex" Tcl_Obj definition:
@@ -1636,9 +1636,9 @@ TkTextIndexForwChars(
int
TkTextIndexCountBytes(
- CONST TkText *textPtr,
- CONST TkTextIndex *indexPtr1, /* Index describing one location. */
- CONST TkTextIndex *indexPtr2) /* Index describing second location. */
+ const TkText *textPtr,
+ const TkTextIndex *indexPtr1, /* Index describing one location. */
+ const TkTextIndex *indexPtr2) /* Index describing second location. */
{
int compare = TkTextIndexCmp(indexPtr1, indexPtr2);
@@ -1653,11 +1653,11 @@ TkTextIndexCountBytes(
static int
IndexCountBytesOrdered(
- CONST TkText *textPtr,
- CONST TkTextIndex *indexPtr1,
+ const TkText *textPtr,
+ const TkTextIndex *indexPtr1,
/* Index describing location of character from
* which to count. */
- CONST TkTextIndex *indexPtr2)
+ const TkTextIndex *indexPtr2)
/* Index describing location of last character
* at which to stop the count. */
{
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index e686826..d89282f 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -1187,7 +1187,7 @@ TkSendVirtualEvent(
event.general.xany.display = Tk_Display(target);
event.virtual.name = Tk_GetUid(eventName);
if (detail != NULL) {
- event.virtual.user_data = detail;
+ event.virtual.user_data = detail;
}
Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL);
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index 15ebcb7..b44eeb5 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -7,8 +7,8 @@
#include <tk.h>
#include "ttkTheme.h"
-/*
- * Under windows, the Tk-provided XDrawLine and XDrawArc have an
+/*
+ * Under windows, the Tk-provided XDrawLine and XDrawArc have an
* off-by-one error in the end point. This is especially apparent with this
* theme. Defining this macro as true handles this case.
*/
@@ -123,8 +123,8 @@ static Ttk_ElementOptionSpec BorderElementOptions[] = {
/*
* <<NOTE-BORDERWIDTH>>: -borderwidth is only partially supported:
* in this theme, borders are always exactly 2 pixels thick.
- * With -borderwidth 0, border is not drawn at all;
- * otherwise a 2-pixel border is used. For -borderwidth > 2,
+ * With -borderwidth 0, border is not drawn at all;
+ * otherwise a 2-pixel border is used. For -borderwidth > 2,
* the excess is used as padding.
*/
@@ -402,7 +402,7 @@ typedef struct {
static Ttk_ElementOptionSpec MenuIndicatorElementOptions[] =
{
{ "-arrowsize", TK_OPTION_PIXELS,
- Tk_Offset(MenuIndicatorElement,sizeObj),
+ Tk_Offset(MenuIndicatorElement,sizeObj),
STR(MENUBUTTON_ARROW_SIZE)},
{ "-arrowcolor",TK_OPTION_COLOR,
Tk_Offset(MenuIndicatorElement,colorObj),
@@ -630,7 +630,7 @@ static void ThumbElementDraw(
Tcl_GetIntFromObj(NULL, sb->gripCountObj, &gripCount);
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
-
+
if (orient == TTK_ORIENT_HORIZONTAL) {
dx = 1; dy = 0;
x1 = x2 = b.x + b.width / 2 - gripCount;
@@ -710,12 +710,12 @@ static void PbarElementDraw(
Drawable d, Ttk_Box b, unsigned state)
{
ScrollbarElement *sb = elementRecord;
-
+
b = Ttk_PadBox(b, Ttk_UniformPadding(2));
if (b.width > 4 && b.height > 4) {
DrawSmoothBorder(tkwin, d, b,
sb->borderColorObj, sb->lightColorObj, sb->darkColorObj);
- XFillRectangle(Tk_Display(tkwin), d,
+ XFillRectangle(Tk_Display(tkwin), d,
BackgroundGC(tkwin, sb->backgroundObj),
b.x+2, b.y+2, b.width-4, b.height-4);
}
@@ -780,8 +780,8 @@ static Ttk_ElementSpec ArrowElementSpec = {
/*------------------------------------------------------------------------
* +++ Notebook elements.
- *
- * Note: Tabs, except for the rightmost, overlap the neighbor to
+ *
+ * Note: Tabs, except for the rightmost, overlap the neighbor to
* their right by one pixel.
*/
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index 2fbcd76..d16cb85 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -68,7 +68,7 @@ static Ttk_ElementSpec HighlightElementSpec =
/*------------------------------------------------------------------------
* +++ Button Border element:
- *
+ *
* The Motif-style button border on X11 consists of (from outside-in):
*
* + focus indicator (controlled by -highlightcolor and -highlightthickness),
@@ -85,13 +85,13 @@ typedef struct {
static Ttk_ElementOptionSpec ButtonBorderElementOptions[] =
{
- { "-background", TK_OPTION_BORDER,
+ { "-background", TK_OPTION_BORDER,
Tk_Offset(ButtonBorderElement,borderObj), DEFAULT_BACKGROUND },
- { "-borderwidth", TK_OPTION_PIXELS,
+ { "-borderwidth", TK_OPTION_PIXELS,
Tk_Offset(ButtonBorderElement,borderWidthObj), DEFAULT_BORDERWIDTH },
- { "-relief", TK_OPTION_RELIEF,
+ { "-relief", TK_OPTION_RELIEF,
Tk_Offset(ButtonBorderElement,reliefObj), "flat" },
- { "-default", TK_OPTION_ANY,
+ { "-default", TK_OPTION_ANY,
Tk_Offset(ButtonBorderElement,defaultStateObj), "disabled" },
{ NULL, 0, 0, NULL }
};
@@ -115,7 +115,7 @@ static void ButtonBorderElementSize(
/*
* (@@@ Note: ButtonBorderElement still still still buggy:
- * padding for default ring is drawn in the wrong color
+ * padding for default ring is drawn in the wrong color
* when the button is active.)
*/
static void ButtonBorderElementDraw(
@@ -281,19 +281,19 @@ static Ttk_ElementSpec ArrowElementSpec =
/*------------------------------------------------------------------------
* +++ Sash element (for ttk::panedwindow)
*
- * NOTES:
+ * NOTES:
*
* panedwindows with -orient horizontal use vertical sashes, and vice versa.
*
* Interpretation of -sashrelief 'groove' and 'ridge' are
* swapped wrt. the core panedwindow, which (I think) has them backwards.
*
- * Default -sashrelief is sunken; the core panedwindow has default
+ * Default -sashrelief is sunken; the core panedwindow has default
* -sashrelief raised, but that looks wrong to me.
*/
static Ttk_Orient SashClientData[] = {
- TTK_ORIENT_HORIZONTAL, TTK_ORIENT_VERTICAL
+ TTK_ORIENT_HORIZONTAL, TTK_ORIENT_VERTICAL
};
typedef struct {
@@ -306,13 +306,13 @@ typedef struct {
} SashElement;
static Ttk_ElementOptionSpec SashOptions[] = {
- { "-background", TK_OPTION_BORDER,
+ { "-background", TK_OPTION_BORDER,
Tk_Offset(SashElement,borderObj), DEFAULT_BACKGROUND },
- { "-sashrelief", TK_OPTION_RELIEF,
+ { "-sashrelief", TK_OPTION_RELIEF,
Tk_Offset(SashElement,sashReliefObj), "sunken" },
{ "-sashthickness", TK_OPTION_PIXELS,
Tk_Offset(SashElement,sashThicknessObj), "6" },
- { "-sashpad", TK_OPTION_PIXELS,
+ { "-sashpad", TK_OPTION_PIXELS,
Tk_Offset(SashElement,sashPadObj), "2" },
{ "-handlesize", TK_OPTION_PIXELS,
Tk_Offset(SashElement,handleSizeObj), "8" },
@@ -367,10 +367,10 @@ static void SashElementDraw(
gc1 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_LIGHT_GC);
break;
- case TK_RELIEF_SOLID:
+ case TK_RELIEF_SOLID:
gc1 = gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_DARK_GC);
break;
- case TK_RELIEF_FLAT:
+ case TK_RELIEF_FLAT:
default:
gc1 = gc2 = Tk_3DBorderGC(tkwin, border, TK_3D_FLAT_GC);
break;
@@ -398,7 +398,7 @@ static void SashElementDraw(
hb = Ttk_StickBox(b, handleSize, handleSize, TTK_STICK_N);
hb.y += handlePad;
}
- Tk_Fill3DRectangle(tkwin, d, border,
+ Tk_Fill3DRectangle(tkwin, d, border,
hb.x, hb.y, hb.width, hb.height, 1, TK_RELIEF_RAISED);
}
}
@@ -495,7 +495,7 @@ MODULE_SCOPE int TtkClassicTheme_Init(Tcl_Interp *interp)
Ttk_RegisterElement(interp, theme, "arrow",
&ArrowElementSpec, &ArrowElements[0]);
- Ttk_RegisterElement(interp, theme, "hsash",
+ Ttk_RegisterElement(interp, theme, "hsash",
&SashElementSpec, &SashClientData[0]);
Ttk_RegisterElement(interp, theme, "vsash",
&SashElementSpec, &SashClientData[1]);
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 1037840..b8b7f29 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -139,7 +139,7 @@ static void TextDraw(TextElement *text, Tk_Window tkwin, Drawable d, Ttk_Box b)
gcValues.foreground = WhitePixelOfScreen(Tk_Screen(tkwin));
gc2 = Tk_GetGC(tkwin, GCFont | GCForeground, &gcValues);
- /*
+ /*
* Place text according to -anchor:
*/
Tk_GetAnchorFromObj(NULL, text->anchorObj, &anchor);
@@ -342,15 +342,15 @@ static void ImageDraw(
Tk_RedrawImage(image->tkimg, 0,0, width, height, d, b.x, b.y);
- /* If we're disabled there's no state-specific 'disabled' image,
+ /* If we're disabled there's no state-specific 'disabled' image,
* stipple the image.
* @@@ Possibly: Don't do disabled-stippling at all;
* @@@ it's ugly and out of fashion.
- * Do not stipple at all under Aqua, just draw the image: it shows up
+ * Do not stipple at all under Aqua, just draw the image: it shows up
* as a white rectangle otherwise.
*/
-
+
if (state & TTK_STATE_DISABLED) {
if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) {
#ifndef MAC_OSX_TK
@@ -577,7 +577,7 @@ static void LabelElementSize(
if (label->compound != TTK_COMPOUND_IMAGE)
textReqWidth = TextReqWidth(&label->text);
- switch (label->compound)
+ switch (label->compound)
{
case TTK_COMPOUND_TEXT:
*widthPtr = textReqWidth;
@@ -588,11 +588,11 @@ static void LabelElementSize(
case TTK_COMPOUND_TOP:
case TTK_COMPOUND_BOTTOM:
case TTK_COMPOUND_CENTER:
- *widthPtr = MAX(label->image.width, textReqWidth);
+ *widthPtr = MAX(label->image.width, textReqWidth);
break;
case TTK_COMPOUND_LEFT:
case TTK_COMPOUND_RIGHT:
- *widthPtr = label->image.width + textReqWidth + label->space;
+ *widthPtr = label->image.width + textReqWidth + label->space;
break;
case TTK_COMPOUND_NONE:
break; /* Can't happen */
diff --git a/generic/ttk/ttkManager.c b/generic/ttk/ttkManager.c
index 24a0fb1..031fdec 100644
--- a/generic/ttk/ttkManager.c
+++ b/generic/ttk/ttkManager.c
@@ -320,7 +320,7 @@ void Ttk_GeometryRequestProc(ClientData clientData, Tk_Window slaveWindow)
int reqHeight= Tk_ReqHeight(slaveWindow);
if (mgr->managerSpec->SlaveRequest(
- mgr->managerData, slaveIndex, reqWidth, reqHeight))
+ mgr->managerData, slaveIndex, reqWidth, reqHeight))
{
ScheduleUpdate(mgr, MGR_RESIZE_REQUIRED);
}
diff --git a/generic/ttk/ttkManager.h b/generic/ttk/ttkManager.h
index d22ff98..07fcea1 100644
--- a/generic/ttk/ttkManager.h
+++ b/generic/ttk/ttkManager.h
@@ -22,7 +22,7 @@ typedef struct TtkManager_ Ttk_Manager;
* SlaveRemoved() is called immediately before a slave is removed.
* NB: the associated slave window may have been destroyed when this
* routine is called.
- *
+ *
* SlaveRequest() is called when a slave requests a size change.
* It should return 1 if the request should propagate, 0 otherwise.
*/
diff --git a/generic/ttk/ttkProgress.c b/generic/ttk/ttkProgress.c
index 4dc50a2..eed90ec 100644
--- a/generic/ttk/ttkProgress.c
+++ b/generic/ttk/ttkProgress.c
@@ -398,7 +398,7 @@ static int ProgressbarStepCommand(
{
Progressbar *pb = recordPtr;
double value = 0.0, stepAmount = 1.0;
- Tcl_Obj *newValueObj;
+ Tcl_Obj *newValueObj;
if (objc == 3) {
if (Tcl_GetDoubleFromObj(interp, objv[2], &stepAmount) != TCL_OK) {
@@ -424,7 +424,7 @@ static int ProgressbarStepCommand(
TtkRedisplayWidget(&pb->core);
- /* Update value by setting the linked -variable, if there is one:
+ /* Update value by setting the linked -variable, if there is one:
*/
if (pb->progress.variableTrace) {
return Tcl_ObjSetVar2(
@@ -444,7 +444,7 @@ static int ProgressbarStepCommand(
}
/* $sb start|stop ?args? --
- * Change [$sb $cmd ...] to [ttk::progressbar::$cmd ...]
+ * Change [$sb $cmd ...] to [ttk::progressbar::$cmd ...]
* and pass to interpreter.
*/
static int ProgressbarStartStopCommand(
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c
index 69753d1..95824af 100644
--- a/generic/ttk/ttkScale.c
+++ b/generic/ttk/ttkScale.c
@@ -46,14 +46,14 @@ typedef struct
static Tk_OptionSpec ScaleOptionSpecs[] =
{
{TK_OPTION_STRING, "-command", "command", "Command", "",
- Tk_Offset(Scale,scale.commandObj), -1,
+ Tk_Offset(Scale,scale.commandObj), -1,
TK_OPTION_NULL_OK,0,0},
{TK_OPTION_STRING, "-variable", "variable", "Variable", "",
- Tk_Offset(Scale,scale.variableObj), -1,
+ Tk_Offset(Scale,scale.variableObj), -1,
0,0,0},
{TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", "horizontal",
Tk_Offset(Scale,scale.orientObj),
- Tk_Offset(Scale,scale.orient), 0,
+ Tk_Offset(Scale,scale.orient), 0,
(ClientData)ttkOrientStrings, STYLE_CHANGED },
{TK_OPTION_DOUBLE, "-from", "from", "From", "0",
@@ -63,7 +63,7 @@ static Tk_OptionSpec ScaleOptionSpecs[] =
{TK_OPTION_DOUBLE, "-value", "value", "Value", "0",
Tk_Offset(Scale,scale.valueObj), -1, 0, 0, 0},
{TK_OPTION_PIXELS, "-length", "length", "Length",
- DEF_SCALE_LENGTH, Tk_Offset(Scale,scale.lengthObj), -1, 0, 0,
+ DEF_SCALE_LENGTH, Tk_Offset(Scale,scale.lengthObj), -1, 0, 0,
GEOMETRY_CHANGED},
WIDGET_TAKEFOCUS_TRUE,
@@ -76,7 +76,7 @@ static double PointToValue(Scale *scalePtr, int x, int y);
/* ScaleVariableChanged --
* Variable trace procedure for scale -variable;
* Updates the scale's value.
- * If the linked variable is not a valid double,
+ * If the linked variable is not a valid double,
* sets the 'invalid' state.
*/
static void ScaleVariableChanged(void *recordPtr, const char *value)
@@ -172,7 +172,7 @@ static int ScalePostConfigure(
/* ScaleGetLayout --
* getLayout hook.
*/
-static Ttk_Layout
+static Ttk_Layout
ScaleGetLayout(Tcl_Interp *interp, Ttk_Theme theme, void *recordPtr)
{
Scale *scalePtr = recordPtr;
@@ -236,7 +236,7 @@ static double ScaleFraction(Scale *scalePtr, double value)
}
/* $scale get ?x y? --
- * Returns the current value of the scale widget, or if $x and
+ * Returns the current value of the scale widget, or if $x and
* $y are specified, the value represented by point @x,y.
*/
static int
diff --git a/generic/ttk/ttkScrollbar.c b/generic/ttk/ttkScrollbar.c
index 5b0c212..9d99ea5 100644
--- a/generic/ttk/ttkScrollbar.c
+++ b/generic/ttk/ttkScrollbar.c
@@ -22,7 +22,7 @@ typedef struct
double first; /* top fraction */
double last; /* bottom fraction */
- Ttk_Box troughBox; /* trough parcel */
+ Ttk_Box troughBox; /* trough parcel */
int minSize; /* minimum size of thumb */
} ScrollbarPart;
@@ -50,7 +50,7 @@ static Tk_OptionSpec ScrollbarOptionSpecs[] =
* +++ Widget hooks.
*/
-static void
+static void
ScrollbarInitialize(Tcl_Interp *interp, void *recordPtr)
{
Scrollbar *sb = recordPtr;
@@ -241,7 +241,7 @@ ScrollbarDeltaCommand(
/* $sb fraction $x $y --
* Returns a real number between 0 and 1 indicating where the
- * point given by x and y lies in the trough area of the scrollbar.
+ * point given by x and y lies in the trough area of the scrollbar.
*/
static int
ScrollbarFractionCommand(
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index d002f2f..7837310 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -56,24 +56,24 @@ static Tk_OptionSpec SquareOptionSpecs[] =
{TK_OPTION_BORDER, "-foreground", "foreground", "Foreground",
DEFAULT_BACKGROUND, Tk_Offset(Square,square.foregroundObj),
-1, 0, 0, 0},
-
+
{TK_OPTION_PIXELS, "-width", "width", "Width",
"50", Tk_Offset(Square,square.widthObj), -1, 0, 0,
GEOMETRY_CHANGED},
{TK_OPTION_PIXELS, "-height", "height", "Height",
"50", Tk_Offset(Square,square.heightObj), -1, 0, 0,
GEOMETRY_CHANGED},
-
+
{TK_OPTION_STRING, "-padding", "padding", "Pad", NULL,
- Tk_Offset(Square,square.paddingObj), -1,
+ Tk_Offset(Square,square.paddingObj), -1,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
-
+
{TK_OPTION_RELIEF, "-relief", "relief", "Relief",
NULL, Tk_Offset(Square,square.reliefObj), -1, TK_OPTION_NULL_OK, 0, 0},
-
+
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
NULL, Tk_Offset(Square,square.anchorObj), -1, TK_OPTION_NULL_OK, 0, 0},
-
+
WIDGET_TAKEFOCUS_TRUE,
WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
};
@@ -138,7 +138,7 @@ static const Ttk_Ensemble SquareCommands[] = {
};
/*
- * The Widget specification structure holds all the implementation
+ * The Widget specification structure holds all the implementation
* information about this widget and this is what must be registered
* with Tk in the package initialization code (see bottom).
*/
@@ -159,7 +159,7 @@ static WidgetSpec SquareWidgetSpec =
TtkWidgetDisplay /* displayProc */
};
-/* ----------------------------------------------------------------------
+/* ----------------------------------------------------------------------
* Square element
*
* In this section we demonstrate what is required to create a new themed
@@ -176,7 +176,7 @@ typedef struct
Tcl_Obj *heightObj;
} SquareElement;
-static Ttk_ElementOptionSpec SquareElementOptions[] =
+static Ttk_ElementOptionSpec SquareElementOptions[] =
{
{ "-background", TK_OPTION_BORDER, Tk_Offset(SquareElement,borderObj),
DEFAULT_BACKGROUND },
@@ -248,7 +248,7 @@ static Ttk_ElementSpec SquareElementSpec =
* engine is similar to the Tk pack geometry manager. Read the documentation
* for the details. In this example we just need to have the square element
* that has been defined for this widget placed on a background. We will
- * also need some padding to keep it away from the edges.
+ * also need some padding to keep it away from the edges.
*/
TTK_BEGIN_LAYOUT(SquareLayout)
@@ -257,12 +257,12 @@ TTK_BEGIN_LAYOUT(SquareLayout)
TTK_NODE("Square.square", 0))
TTK_END_LAYOUT
-/* ----------------------------------------------------------------------
+/* ----------------------------------------------------------------------
*
* Widget initialization.
*
* This file defines a new element and a new widget. We need to register
- * the element with the themes that will need it. In this case we will
+ * the element with the themes that will need it. In this case we will
* register with the default theme that is the root of the theme inheritance
* tree. This means all themes will find this element.
* We then need to register the widget class style. This is the layout
@@ -287,10 +287,10 @@ TtkSquareWidget_Init(Tcl_Interp *interp)
/* register the new elements for this theme engine */
Ttk_RegisterElement(interp, theme, "square", &SquareElementSpec, NULL);
-
+
/* register the layout for this theme */
Ttk_RegisterLayout(theme, "TSquare", SquareLayout);
-
+
/* register the widget */
RegisterWidget(interp, "ttk::square", &SquareWidgetSpec);
diff --git a/generic/ttk/ttkStubLib.c b/generic/ttk/ttkStubLib.c
index 2c07b9d..c17f1e9 100644
--- a/generic/ttk/ttkStubLib.c
+++ b/generic/ttk/ttkStubLib.c
@@ -67,7 +67,7 @@ error:
"Error loading ", packageName, " package",
" (requested version '", version,
"', loaded version '", actualVersion, "'): ",
- errMsg,
+ errMsg,
NULL);
return NULL;
}
diff --git a/generic/ttk/ttkTagSet.c b/generic/ttk/ttkTagSet.c
index f2108b9..31798ea 100644
--- a/generic/ttk/ttkTagSet.c
+++ b/generic/ttk/ttkTagSet.c
@@ -188,7 +188,7 @@ int Ttk_TagSetAdd(Ttk_TagSet tagset, Ttk_Tag tag)
return 0;
}
}
- tagset->tags = ckrealloc(tagset->tags,
+ tagset->tags = ckrealloc(tagset->tags,
(tagset->nTags+1)*sizeof(tagset->tags[0]));
tagset->tags[tagset->nTags++] = tag;
return 1;
diff --git a/generic/ttk/ttkTrace.c b/generic/ttk/ttkTrace.c
index ba66db4..c0f17cf 100644
--- a/generic/ttk/ttkTrace.c
+++ b/generic/ttk/ttkTrace.c
@@ -3,7 +3,7 @@
*
* Simplified interface to Tcl_TraceVariable.
*
- * PROBLEM: Can't distinguish "variable does not exist" (which is OK)
+ * PROBLEM: Can't distinguish "variable does not exist" (which is OK)
* from other errors (which are not).
*/
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index e4dd712..798bcce 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -111,8 +111,8 @@ MODULE_SCOPE int TtkWidgetConstructorObjCmd(
/* WIDGET_TAKEFOCUS_TRUE --
* WIDGET_TAKEFOCUS_FALSE --
- * Add one or the other of these to each OptionSpecs table
- * to indicate whether the widget should take focus
+ * Add one or the other of these to each OptionSpecs table
+ * to indicate whether the widget should take focus
* during keyboard traversal.
*/
#define WIDGET_TAKEFOCUS_TRUE \