summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkTextDisp.c14
2 files changed, 12 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f5174d..116297b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-03 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * generic/tkTextDisp.c (TextGetScrollInfoObj): Stop complaints
+ about signed vs. unsigned for the length of strings.
+
2003-11-01 Donal K. Fellows <fellowsd@cs.man.ac.uk>
* library/msgs/nl.msg: Updated messages from Arjen Markus and
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 618fb94..f57d63f 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextDisp.c,v 1.20 2003/10/31 19:14:27 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.21 2003/11/03 13:10:05 dkf Exp $
*/
#include "tkPort.h"
@@ -6862,7 +6862,7 @@ TextGetScrollInfoObj(interp, textPtr, objc, objv, dblPtr, intPtr)
arg2 = Tcl_GetStringFromObj(objv[2], &length);
c = arg2[0];
- if ((c == 'm') && (strncmp(arg2, "moveto", length) == 0)) {
+ if (c=='m' && strncmp(arg2, "moveto", (unsigned) length)==0) {
if (objc != 4) {
Tcl_WrongNumArgs(interp, 2, objv, "moveto fraction");
return TKTEXT_SCROLL_ERROR;
@@ -6871,7 +6871,7 @@ TextGetScrollInfoObj(interp, textPtr, objc, objv, dblPtr, intPtr)
return TKTEXT_SCROLL_ERROR;
}
return TKTEXT_SCROLL_MOVETO;
- } else if ((c == 's') && (strncmp(arg2, "scroll", length) == 0)) {
+ } else if (c=='s' && strncmp(arg2, "scroll", (unsigned) length)==0) {
CONST char *arg4;
size_t argLen;
@@ -6883,22 +6883,22 @@ TextGetScrollInfoObj(interp, textPtr, objc, objv, dblPtr, intPtr)
arg4 = Tcl_GetStringFromObj(objv[4], &length);
argLen = (size_t) length;
c = arg4[0];
- if ((c == 'p') && (length == 1)) {
+ if (c=='p' && length==1) {
Tcl_AppendResult(interp, "ambiguous argument \"", arg4,
"\": must be units, pages or pixels", (char *) NULL);
return TKTEXT_SCROLL_ERROR;
- } else if ((c == 'p') && (strncmp(arg4, "pages", argLen) == 0)) {
+ } else if (c=='p' && strncmp(arg4, "pages", argLen)==0) {
if (Tcl_GetIntFromObj(interp, objv[3], intPtr) != TCL_OK) {
return TKTEXT_SCROLL_ERROR;
}
return TKTEXT_SCROLL_PAGES;
- } else if ((c == 'p') && (strncmp(arg4, "pixels", argLen) == 0)) {
+ } else if (c=='p' && strncmp(arg4, "pixels", argLen)==0) {
if (Tk_GetPixelsFromObj(interp, textPtr->tkwin, objv[3],
intPtr) != TCL_OK) {
return TKTEXT_SCROLL_ERROR;
}
return TKTEXT_SCROLL_PIXELS;
- } else if ((c == 'u') && (strncmp(arg4, "units", argLen) == 0)) {
+ } else if (c=='u' && strncmp(arg4, "units", argLen)==0) {
if (Tcl_GetIntFromObj(interp, objv[3], intPtr) != TCL_OK) {
return TKTEXT_SCROLL_ERROR;
}