summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixScale.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixScale.c')
-rw-r--r--unix/tkUnixScale.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/unix/tkUnixScale.c b/unix/tkUnixScale.c
index 8fb95dd..8f4d23b 100644
--- a/unix/tkUnixScale.c
+++ b/unix/tkUnixScale.c
@@ -3,8 +3,8 @@
*
* This file implements the X specific portion of the scale widget.
*
- * Copyright (c) 1996 Sun Microsystems, Inc.
- * Copyright (c) 1998-2000 Scriptics Corporation.
+ * Copyright © 1996 Sun Microsystems, Inc.
+ * Copyright © 1998-2000 Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -268,7 +268,7 @@ DisplayVerticalValue(
const char *format) /* Format string to use for the value */
{
Tk_Window tkwin = scalePtr->tkwin;
- int y, width, length;
+ int y, width;
char valueString[TCL_DOUBLE_SPACE];
Tk_FontMetrics fm;
@@ -277,7 +277,7 @@ DisplayVerticalValue(
if (snprintf(valueString, TCL_DOUBLE_SPACE, format, value) < 0) {
valueString[TCL_DOUBLE_SPACE - 1] = '\0';
}
- length = (int) strlen(valueString);
+ Tcl_Size length = strlen(valueString);
width = Tk_TextWidth(scalePtr->tkfont, valueString, length);
/*
@@ -491,7 +491,7 @@ DisplayHorizontalValue(
const char *format) /* Format string to use for the value */
{
Tk_Window tkwin = scalePtr->tkwin;
- int x, y, length, width;
+ int x, y, width;
char valueString[TCL_DOUBLE_SPACE];
Tk_FontMetrics fm;
@@ -501,7 +501,7 @@ DisplayHorizontalValue(
if (snprintf(valueString, TCL_DOUBLE_SPACE, format, value) < 0) {
valueString[TCL_DOUBLE_SPACE - 1] = '\0';
}
- length = (int) strlen(valueString);
+ Tcl_Size length = strlen(valueString);
width = Tk_TextWidth(scalePtr->tkfont, valueString, length);
/*
@@ -544,7 +544,7 @@ DisplayHorizontalValue(
void
TkpDisplayScale(
- ClientData clientData) /* Widget record for scale. */
+ void *clientData) /* Widget record for scale. */
{
TkScale *scalePtr = (TkScale *)clientData;
Tk_Window tkwin = scalePtr->tkwin;
@@ -572,10 +572,10 @@ TkpDisplayScale(
string[TCL_DOUBLE_SPACE - 1] = '\0';
}
Tcl_DStringInit(&buf);
- Tcl_DStringAppend(&buf, scalePtr->command, -1);
- Tcl_DStringAppend(&buf, " ", -1);
- Tcl_DStringAppend(&buf, string, -1);
- result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, TCL_EVAL_GLOBAL);
+ Tcl_DStringAppend(&buf, scalePtr->command, TCL_INDEX_NONE);
+ Tcl_DStringAppend(&buf, " ", TCL_INDEX_NONE);
+ Tcl_DStringAppend(&buf, string, TCL_INDEX_NONE);
+ result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), TCL_INDEX_NONE, TCL_EVAL_GLOBAL);
Tcl_DStringFree(&buf);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (command executed by scale)");
@@ -632,7 +632,7 @@ TkpDisplayScale(
Tk_Height(tkwin) - 2*scalePtr->highlightWidth,
scalePtr->borderWidth, scalePtr->relief);
}
- if (scalePtr->highlightWidth != 0) {
+ if (scalePtr->highlightWidth > 0) {
GC gc;
if (scalePtr->flags & GOT_FOCUS) {