summaryrefslogtreecommitdiffstats
path: root/generic/tkTextMark.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextMark.c')
-rw-r--r--generic/tkTextMark.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c
index 07094f1..209a33b 100644
--- a/generic/tkTextMark.c
+++ b/generic/tkTextMark.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextMark.c,v 1.2 1998/09/14 18:23:19 stanton Exp $
+ * RCS: @(#) $Id: tkTextMark.c,v 1.3 1999/04/16 01:51:24 stanton Exp $
*/
#include "tkInt.h"
@@ -134,9 +134,9 @@ TkTextMarkCmd(textPtr, interp, argc, argv)
markPtr = (TkTextSegment *) Tcl_GetHashValue(hPtr);
if (argc == 4) {
if (markPtr->typePtr == &tkTextRightMarkType) {
- interp->result = "right";
+ Tcl_SetResult(interp, "right", TCL_STATIC);
} else {
- interp->result = "left";
+ Tcl_SetResult(interp, "left", TCL_STATIC);
}
return TCL_OK;
}
@@ -319,10 +319,10 @@ TkTextMarkSegToIndex(textPtr, markPtr, indexPtr)
indexPtr->tree = textPtr->tree;
indexPtr->linePtr = markPtr->body.mark.linePtr;
- indexPtr->charIndex = 0;
+ indexPtr->byteIndex = 0;
for (segPtr = indexPtr->linePtr->segPtr; segPtr != markPtr;
segPtr = segPtr->nextPtr) {
- indexPtr->charIndex += segPtr->size;
+ indexPtr->byteIndex += segPtr->size;
}
}
@@ -468,7 +468,7 @@ MarkLayoutProc(textPtr, indexPtr, segPtr, offset, maxX, maxChars,
chunkPtr->undisplayProc = InsertUndisplayProc;
chunkPtr->measureProc = (Tk_ChunkMeasureProc *) NULL;
chunkPtr->bboxProc = (Tk_ChunkBboxProc *) NULL;
- chunkPtr->numChars = 0;
+ chunkPtr->numBytes = 0;
chunkPtr->minAscent = 0;
chunkPtr->minDescent = 0;
chunkPtr->minHeight = 0;
@@ -669,7 +669,7 @@ MarkFindNext(interp, textPtr, string)
return TCL_ERROR;
}
for (offset = 0, segPtr = index.linePtr->segPtr;
- segPtr != NULL && offset < index.charIndex;
+ segPtr != NULL && offset < index.byteIndex;
offset += segPtr->size, segPtr = segPtr->nextPtr) {
/* Empty loop body */ ;
}
@@ -692,7 +692,7 @@ MarkFindNext(interp, textPtr, string)
if (index.linePtr == (TkTextLine *) NULL) {
return TCL_OK;
}
- index.charIndex = 0;
+ index.byteIndex = 0;
segPtr = index.linePtr->segPtr;
}
}
@@ -742,7 +742,7 @@ MarkFindPrev(interp, textPtr, string)
return TCL_ERROR;
}
for (offset = 0, segPtr = index.linePtr->segPtr;
- segPtr != NULL && offset < index.charIndex;
+ segPtr != NULL && offset < index.byteIndex;
offset += segPtr->size, segPtr = segPtr->nextPtr) {
/* Empty loop body */ ;
}