summaryrefslogtreecommitdiffstats
path: root/generic/tkTextWind.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextWind.c')
-rw-r--r--generic/tkTextWind.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index a799da4..ef28b44 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -6,12 +6,12 @@
* widget command for texts.
*
* Copyright (c) 1994 The Regents of the University of California.
- * Copyright (c) 1994-1995 Sun Microsystems, Inc.
+ * Copyright (c) 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextWind.c,v 1.2 1998/09/14 18:23:19 stanton Exp $
+ * RCS: @(#) $Id: tkTextWind.c,v 1.3 1999/04/16 01:51:24 stanton Exp $
*/
#include "tk.h"
@@ -244,7 +244,7 @@ TkTextWindowCmd(textPtr, interp, argc, argv)
lineIndex = TkBTreeLineIndex(index.linePtr);
if (lineIndex == TkBTreeNumLines(textPtr->tree)) {
lineIndex--;
- TkTextMakeIndex(textPtr->tree, lineIndex, 1000000, &index);
+ TkTextMakeByteIndex(textPtr->tree, lineIndex, 1000000, &index);
}
/*
@@ -311,7 +311,7 @@ TkTextWindowCmd(textPtr, interp, argc, argv)
*
* Results:
* The return value is a standard Tcl result. If TCL_ERROR is
- * returned, then interp->result contains an error message..
+ * returned, then the interp's result contains an error message..
*
* Side effects:
* Configuration information for the embedded window changes,
@@ -541,7 +541,7 @@ EmbWinStructureProc(clientData, eventPtr)
ewPtr->body.ew.tkwin = NULL;
index.tree = ewPtr->body.ew.textPtr->tree;
index.linePtr = ewPtr->body.ew.linePtr;
- index.charIndex = TkTextSegToOffset(ewPtr, ewPtr->body.ew.linePtr);
+ index.byteIndex = TkTextSegToOffset(ewPtr, ewPtr->body.ew.linePtr);
TkTextChanged(ewPtr->body.ew.textPtr, &index, &index);
}
@@ -575,7 +575,7 @@ EmbWinRequestProc(clientData, tkwin)
index.tree = ewPtr->body.ew.textPtr->tree;
index.linePtr = ewPtr->body.ew.linePtr;
- index.charIndex = TkTextSegToOffset(ewPtr, ewPtr->body.ew.linePtr);
+ index.byteIndex = TkTextSegToOffset(ewPtr, ewPtr->body.ew.linePtr);
TkTextChanged(ewPtr->body.ew.textPtr, &index, &index);
}
@@ -620,7 +620,7 @@ EmbWinLostSlaveProc(clientData, tkwin)
ewPtr->body.ew.tkwin = NULL;
index.tree = ewPtr->body.ew.textPtr->tree;
index.linePtr = ewPtr->body.ew.linePtr;
- index.charIndex = TkTextSegToOffset(ewPtr, ewPtr->body.ew.linePtr);
+ index.byteIndex = TkTextSegToOffset(ewPtr, ewPtr->body.ew.linePtr);
TkTextChanged(ewPtr->body.ew.textPtr, &index, &index);
}
@@ -778,7 +778,7 @@ EmbWinLayoutProc(textPtr, indexPtr, ewPtr, offset, maxX, maxChars,
goto gotWindow;
}
Tcl_DStringInit(&name);
- Tcl_DStringAppend(&name, textPtr->interp->result, -1);
+ Tcl_DStringAppend(&name, Tcl_GetStringResult(textPtr->interp), -1);
Tcl_ResetResult(textPtr->interp);
ewPtr->body.ew.tkwin = Tk_NameToWindow(textPtr->interp,
Tcl_DStringValue(&name), textPtr->tkwin);
@@ -835,7 +835,7 @@ EmbWinLayoutProc(textPtr, indexPtr, ewPtr, offset, maxX, maxChars,
height = Tk_ReqHeight(ewPtr->body.ew.tkwin) + 2*ewPtr->body.ew.padY;
}
if ((width > (maxX - chunkPtr->x))
- && !noCharsYet && (textPtr->wrapMode != tkTextNoneUid)) {
+ && !noCharsYet && (textPtr->wrapMode != Tk_GetUid("none"))) {
return 0;
}
@@ -847,7 +847,7 @@ EmbWinLayoutProc(textPtr, indexPtr, ewPtr, offset, maxX, maxChars,
chunkPtr->undisplayProc = EmbWinUndisplayProc;
chunkPtr->measureProc = (Tk_ChunkMeasureProc *) NULL;
chunkPtr->bboxProc = EmbWinBboxProc;
- chunkPtr->numChars = 1;
+ chunkPtr->numBytes = 1;
if (ewPtr->body.ew.align == ALIGN_BASELINE) {
chunkPtr->minAscent = height - ewPtr->body.ew.padY;
chunkPtr->minDescent = ewPtr->body.ew.padY;
@@ -1171,6 +1171,6 @@ TkTextWindowIndex(textPtr, name, indexPtr)
ewPtr = (TkTextSegment *) Tcl_GetHashValue(hPtr);
indexPtr->tree = textPtr->tree;
indexPtr->linePtr = ewPtr->body.ew.linePtr;
- indexPtr->charIndex = TkTextSegToOffset(ewPtr, indexPtr->linePtr);
+ indexPtr->byteIndex = TkTextSegToOffset(ewPtr, indexPtr->linePtr);
return 1;
}