diff --git a/doc/keysyms.n b/doc/keysyms.n index b9ccd849b..c37c024a9 100644 --- a/doc/keysyms.n +++ b/doc/keysyms.n @@ -1096,6 +1096,7 @@ dead_U 65161 0xFE89 dead_schwa 65162 0xFE8A dead_SCHWA 65163 0xFE8B dead_greek 65164 0xFE8C +dead_hamza 65165 0xFE8D dead_lowline 65168 0xFE90 dead_aboveverticalline 65169 0xFE91 dead_belowverticalline 65170 0xFE92 diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c index 82b8ef2bc..1ff473307 100644 --- a/generic/tkOldTest.c +++ b/generic/tkOldTest.c @@ -39,7 +39,7 @@ typedef struct TImageModel { int width, height; /* Dimensions of image. */ char *imageName; /* Name of image (malloc-ed). */ char *varName; /* Name of variable in which to log events for - * image (malloc-ed). */ + * image (malloc-ed). */ } TImageModel; /* diff --git a/generic/tkScale.c b/generic/tkScale.c index a112f4817..80b08cbee 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -151,7 +151,7 @@ enum command { static void ComputeFormat(TkScale *scalePtr, int forTicks); static void ComputeScaleGeometry(TkScale *scalePtr); static int ConfigureScale(Tcl_Interp *interp, TkScale *scalePtr, - int objc, Tcl_Obj *const objv[]); + Tcl_Size objc, Tcl_Obj *const objv[]); static void DestroyScale(void *memPtr); static double MaxTickRoundingError(TkScale *scalePtr, double tickResolution); @@ -590,7 +590,7 @@ ConfigureScale( Tcl_Interp *interp, /* Used for error reporting. */ TkScale *scalePtr, /* Information about widget; may or may not * already have values for some fields. */ - int objc, /* Number of valid entries in objv. */ + Tcl_Size objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tk_SavedOptions savedOptions; @@ -647,10 +647,10 @@ ConfigureScale( } } - /* - * The fromValue shall not be rounded to the resolution, but the - * toValue and tickInterval do. - */ + /* + * The fromValue shall not be rounded to the resolution, but the + * toValue and tickInterval do. + */ scalePtr->toValue = TkRoundValueToResolution(scalePtr, scalePtr->toValue); scalePtr->tickInterval = TkRoundIntervalToResolution(scalePtr, @@ -712,9 +712,9 @@ ConfigureScale( } else { char varString[TCL_DOUBLE_SPACE], scaleString[TCL_DOUBLE_SPACE]; - Tcl_PrintDouble(NULL, varValue, varString); - Tcl_PrintDouble(NULL, scalePtr->value, scaleString); - if (strcmp(varString, scaleString)) { + Tcl_PrintDouble(NULL, varValue, varString); + Tcl_PrintDouble(NULL, scalePtr->value, scaleString); + if (strcmp(varString, scaleString)) { ScaleSetVariable(scalePtr); } } @@ -1056,14 +1056,14 @@ ComputeScaleGeometry( */ if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->valueFormat, - scalePtr->fromValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->fromValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } valuePixels = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->valueFormat, - scalePtr->toValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->toValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } tmp = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (valuePixels < tmp) { @@ -1075,14 +1075,14 @@ ComputeScaleGeometry( */ if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->tickFormat, - scalePtr->fromValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->fromValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } tickPixels = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (snprintf(valueString, TCL_DOUBLE_SPACE, scalePtr->tickFormat, - scalePtr->toValue) < 0) { - valueString[TCL_DOUBLE_SPACE - 1] = '\0'; + scalePtr->toValue) < 0) { + valueString[TCL_DOUBLE_SPACE - 1] = '\0'; } tmp = Tk_TextWidth(scalePtr->tkfont, valueString, -1); if (tickPixels < tmp) { @@ -1277,7 +1277,7 @@ TkRoundValueToResolution( double value) /* Value to round. */ { return TkRoundIntervalToResolution(scalePtr, value - scalePtr->fromValue) - + scalePtr->fromValue; + + scalePtr->fromValue; } double @@ -1294,13 +1294,13 @@ TkRoundIntervalToResolution( rounded = scalePtr->resolution * tick; rem = value - rounded; if (rem < 0) { - if (rem <= -scalePtr->resolution/2) { - rounded = (tick - 1.0) * scalePtr->resolution; - } + if (rem <= -scalePtr->resolution/2) { + rounded = (tick - 1.0) * scalePtr->resolution; + } } else { - if (rem >= scalePtr->resolution/2) { - rounded = (tick + 1.0) * scalePtr->resolution; - } + if (rem >= scalePtr->resolution/2) { + rounded = (tick + 1.0) * scalePtr->resolution; + } } return rounded; } @@ -1344,27 +1344,27 @@ ScaleVarProc( */ if (flags & TCL_TRACE_UNSETS) { - if (!Tcl_InterpDeleted(interp) && scalePtr->varNamePtr) { - void *probe = NULL; - - do { - probe = Tcl_VarTraceInfo(interp, - Tcl_GetString(scalePtr->varNamePtr), - TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, - ScaleVarProc, probe); - if (probe == (void *)scalePtr) { - break; - } - } while (probe); - if (probe) { - /* - * We were able to fetch the unset trace for our - * varNamePtr, which means it is not unset and not - * the cause of this unset trace. Instead some outdated - * former variable must be, and we should ignore it. - */ - return NULL; - } + if (!Tcl_InterpDeleted(interp) && scalePtr->varNamePtr) { + void *probe = NULL; + + do { + probe = Tcl_VarTraceInfo(interp, + Tcl_GetString(scalePtr->varNamePtr), + TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + ScaleVarProc, probe); + if (probe == (void *)scalePtr) { + break; + } + } while (probe); + if (probe) { + /* + * We were able to fetch the unset trace for our + * varNamePtr, which means it is not unset and not + * the cause of this unset trace. Instead some outdated + * former variable must be, and we should ignore it. + */ + return NULL; + } Tcl_TraceVar2(interp, Tcl_GetString(scalePtr->varNamePtr), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ScaleVarProc, clientData); @@ -1490,10 +1490,10 @@ ScaleSetVariable( if (scalePtr->varNamePtr != NULL) { char string[TCL_DOUBLE_SPACE]; - if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->valueFormat, - scalePtr->value) < 0) { - string[TCL_DOUBLE_SPACE - 1] = '\0'; - } + if (snprintf(string, TCL_DOUBLE_SPACE, scalePtr->valueFormat, + scalePtr->value) < 0) { + string[TCL_DOUBLE_SPACE - 1] = '\0'; + } scalePtr->flags |= SETTING_VAR; Tcl_ObjSetVar2(scalePtr->interp, scalePtr->varNamePtr, NULL, Tcl_NewStringObj(string, TCL_INDEX_NONE), TCL_GLOBAL_ONLY); diff --git a/generic/tkText.c b/generic/tkText.c index e12e2bc99..7623802cd 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -1475,8 +1475,8 @@ TextWidgetObjCmd( deleteInsertOffset = insertLength; } - indexFromLine = TkBTreeLinesTo(textPtr, indexFromPtr->linePtr); - indexFromByteOffset = indexFromPtr->byteIndex; + indexFromLine = TkBTreeLinesTo(textPtr, indexFromPtr->linePtr); + indexFromByteOffset = indexFromPtr->byteIndex; result = TextReplaceCmd(textPtr, interp, indexFromPtr, indexToPtr, objc, objv, 0); @@ -1486,11 +1486,11 @@ TextWidgetObjCmd( * Move the insertion position to the correct place. */ - TkTextIndex indexTmp; + TkTextIndex indexTmp; - TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, indexFromLine, - indexFromByteOffset, &indexTmp); - TkTextIndexForwChars(NULL, &indexTmp, + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, indexFromLine, + indexFromByteOffset, &indexTmp); + TkTextIndexForwChars(NULL, &indexTmp, deleteInsertOffset, &index, COUNT_INDICES); TkBTreeUnlinkSegment(textPtr->insertMarkPtr, textPtr->insertMarkPtr->body.mark.linePtr); @@ -2733,9 +2733,9 @@ InsertChars( */ for (tPtr = sharedTextPtr->peers; tPtr != NULL ; tPtr = tPtr->next) { - if (TkBTreeCharTagged(indexPtr, tPtr->selTagPtr)) { - TkTextSelectionEvent(tPtr); - } + if (TkBTreeCharTagged(indexPtr, tPtr->selTagPtr)) { + TkTextSelectionEvent(tPtr); + } tPtr->abortSelections = 1; } @@ -2873,9 +2873,9 @@ TextPushUndoAction( Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj, Tcl_NewStringObj(rMarkName, TCL_INDEX_NONE)); Tcl_ListObjAppendElement(NULL, markGravityLUndoMarkCmdObj, - Tcl_NewStringObj("left", 4)); + Tcl_NewStringObj("left", 4)); Tcl_ListObjAppendElement(NULL, markGravityRUndoMarkCmdObj, - Tcl_NewStringObj("right", 5)); + Tcl_NewStringObj("right", 5)); /* * Note: we don't wish to use textPtr->widgetCmd in these callbacks @@ -3200,7 +3200,7 @@ DeleteIndexRange( for (i=0, hPtr=Tcl_FirstHashEntry(&sharedTextPtr->tagTable, &search); hPtr != NULL; i++, hPtr = Tcl_NextHashEntry(&search)) { - TkBTreeTag(&index1, &index2, (TkTextTag *)Tcl_GetHashValue(hPtr), 0); + TkBTreeTag(&index1, &index2, (TkTextTag *)Tcl_GetHashValue(hPtr), 0); } /* @@ -3210,7 +3210,7 @@ DeleteIndexRange( for (tPtr = sharedTextPtr->peers; tPtr != NULL ; tPtr = tPtr->next) { - if (TkBTreeTag(&index1, &index2, tPtr->selTagPtr, 0)) { + if (TkBTreeTag(&index1, &index2, tPtr->selTagPtr, 0)) { /* * Send an event that the selection changed. This is * equivalent to: @@ -3219,7 +3219,7 @@ DeleteIndexRange( TkTextSelectionEvent(textPtr); tPtr->abortSelections = 1; - } + } } /* @@ -5149,13 +5149,13 @@ TextEditUndo( */ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s", - Tk_PathName(textPtr->tkwin)); + 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_AddErrorInfo(textPtr->interp, + "\n (on undoing)"); + Tcl_BackgroundException(textPtr->interp, code); } Tcl_DecrRefCount(cmdObj); @@ -5215,13 +5215,13 @@ TextEditRedo( */ cmdObj = Tcl_ObjPrintf("::tk::TextUndoRedoProcessMarks %s", - Tk_PathName(textPtr->tkwin)); + 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_AddErrorInfo(textPtr->interp, + "\n (on undoing)"); + Tcl_BackgroundException(textPtr->interp, code); } Tcl_DecrRefCount(cmdObj); @@ -6161,13 +6161,13 @@ SearchCore( break; } else { alreadySearchOffset -= (matchLength ? matchLength : 1); - if (alreadySearchOffset < 0) { - break; - } + if (alreadySearchOffset < 0) { + break; + } } } else { - firstOffset = matchLength ? p - startOfLine + matchLength - : p - startOfLine + (Tcl_Size)1; + firstOffset = matchLength ? p - startOfLine + matchLength + : p - startOfLine + (Tcl_Size)1; if (firstOffset >= lastOffset) { /* * Now, we have to be careful not to find