summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--generic/tkCanvText.c5
-rw-r--r--generic/tkEntry.c12
-rw-r--r--generic/tkSelect.c4
-rw-r--r--generic/tkText.c4
-rw-r--r--generic/tkTextIndex.c6
-rw-r--r--mac/tkMacFont.c8
-rw-r--r--unix/tkUnixMenu.c6
-rw-r--r--win/tkWinMenu.c8
9 files changed, 41 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d9a1b5..69c6371 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-01-16 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tkCanvText.c (GetSelText):
+ * generic/tkEntry.c (Entry{FetchSelection,Setvalue},ExpandPercents):
+ * generic/tkSelect.c (HandleTclCommand):
+ * generic/tkText.c (TextSearchCmd):
+ * generic/tkTextIndex.c (TkTextMakeByteIndex,TkTextIndexBackChars):
+ * mac/tkMacFont.c (Tk_MeasureChars,BreakLine):
+ * unix/tkUnixMenu.c (DrawMenuUnderline):
+ * win/tkWinMenu.c (GetEntryText,DrawMenuUnderline): Updated
+ callers of Tcl_Utf* and Tcl_Regexp* APIs to reflect TIP 27 API
+ changes (see Tcl Patch 471509). [Patch 471513]
+
2002-01-16 Mo DeJong <mdejong@users.sourceforge.net>
* unix/configure: Regen.
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index ef57473..f8d0d7b 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvText.c,v 1.10 2001/08/17 21:08:28 drh Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.11 2002/01/17 03:35:00 dgp Exp $
*/
#include <stdio.h>
@@ -1376,7 +1376,8 @@ GetSelText(canvas, itemPtr, offset, buffer, maxBytes)
{
TextItem *textPtr = (TextItem *) itemPtr;
int byteCount;
- char *text, *selStart, *selEnd;
+ char *text;
+ CONST char *selStart, *selEnd;
Tk_CanvasTextInfo *textInfoPtr = textPtr->textInfoPtr;
if ((textInfoPtr->selectFirst < 0) ||
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 43c3429..55dc56b 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.23 2001/09/21 22:08:19 hobbs Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.24 2002/01/17 03:35:00 dgp Exp $
*/
#include "tkInt.h"
@@ -702,7 +702,7 @@ static int EntryValidate _ANSI_ARGS_((Entry *entryPtr,
static int EntryValidateChange _ANSI_ARGS_((Entry *entryPtr,
char *change, char *new, int index, int type));
static void ExpandPercents _ANSI_ARGS_((Entry *entryPtr,
- char *before, char *change, char *new,
+ CONST char *before, char *change, char *new,
int index, int type, Tcl_DString *dsPtr));
static void EntryValueChanged _ANSI_ARGS_((Entry *entryPtr,
char *newValue));
@@ -2955,7 +2955,8 @@ EntryFetchSelection(clientData, offset, buffer, maxBytes)
{
Entry *entryPtr = (Entry *) clientData;
int byteCount;
- char *string, *selStart, *selEnd;
+ char *string;
+ CONST char *selStart, *selEnd;
if ((entryPtr->selectFirst < 0) || !(entryPtr->exportSelection)) {
return -1;
@@ -3526,7 +3527,8 @@ EntryValidateChange(entryPtr, change, new, index, type)
static void
ExpandPercents(entryPtr, before, change, new, index, type, dsPtr)
register Entry *entryPtr; /* Entry that needs validation. */
- register char *before; /* Command containing percent
+ register CONST char *before;
+ /* Command containing percent
* expressions to be replaced. */
char *change; /* Characters to added/deleted
* (NULL-terminated string). */
@@ -3539,7 +3541,7 @@ ExpandPercents(entryPtr, before, change, new, index, type, dsPtr)
int spaceNeeded, cvtFlags; /* Used to substitute string as proper Tcl
* list element. */
int number, length;
- register char *string;
+ register CONST char *string;
Tcl_UniChar ch;
char numStorage[2*TCL_INTEGER_SPACE];
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index a8335c4..71b73d0 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkSelect.c,v 1.8 2002/01/04 16:35:04 dgp Exp $
+ * RCS: @(#) $Id: tkSelect.c,v 1.9 2002/01/17 03:35:00 dgp Exp $
*/
#include "tkInt.h"
@@ -1336,7 +1336,7 @@ HandleTclCommand(clientData, offset, buffer, maxBytes)
Tcl_DString oldResult;
Tcl_Obj *objPtr;
int extraBytes, charOffset, count, numChars;
- char *p;
+ CONST char *p;
/*
* We must also protect the interpreter and the command from being
diff --git a/generic/tkText.c b/generic/tkText.c
index fd76b94..cd8e78c 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkText.c,v 1.23 2001/12/05 18:18:22 hobbs Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.24 2002/01/17 03:35:00 dgp Exp $
*/
#include "default.h"
@@ -1964,7 +1964,7 @@ TextSearchCmd(textPtr, interp, argc, argv)
i = p - startOfLine;
thisLength = patLength;
} else {
- char *start, *end;
+ CONST char *start, *end;
int match;
match = Tcl_RegExpExec(interp, regexp,
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 8376419..1ee3b05 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.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: tkTextIndex.c,v 1.3 1999/04/16 01:51:24 stanton Exp $
+ * RCS: @(#) $Id: tkTextIndex.c,v 1.4 2002/01/17 03:35:00 dgp Exp $
*/
#include "default.h"
@@ -64,7 +64,7 @@ TkTextMakeByteIndex(tree, lineIndex, byteIndex, indexPtr)
{
TkTextSegment *segPtr;
int index;
- char *p, *start;
+ CONST char *p, *start;
Tcl_UniChar ch;
indexPtr->tree = tree;
@@ -977,7 +977,7 @@ TkTextIndexBackChars(srcPtr, charCount, dstPtr)
{
TkTextSegment *segPtr, *oldPtr;
int lineIndex, segSize;
- char *p, *start, *end;
+ CONST char *p, *start, *end;
if (charCount <= 0) {
TkTextIndexForwChars(srcPtr, -charCount, dstPtr);
diff --git a/mac/tkMacFont.c b/mac/tkMacFont.c
index 7e7c90b..f58c76d 100644
--- a/mac/tkMacFont.c
+++ b/mac/tkMacFont.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: tkMacFont.c,v 1.6 2001/11/23 02:05:48 das Exp $
+ * RCS: @(#) $Id: tkMacFont.c,v 1.7 2002/01/17 03:35:01 dgp Exp $
*/
#include <Windows.h>
@@ -257,7 +257,7 @@ static void ReleaseFont(MacFont *fontPtr);
static void ReleaseSubFont(SubFont *subFontPtr);
static int SeenName(CONST char *name, Tcl_DString *dsPtr);
-static char * BreakLine(FontFamily *familyPtr, int flags,
+static CONST char * BreakLine(FontFamily *familyPtr, int flags,
CONST char *source, int numBytes, int *widthPtr);
static int GetFamilyNum(CONST char *faceName, short *familyPtr);
static int GetFamilyOrAliasNum(CONST char *faceName,
@@ -761,7 +761,7 @@ Tk_MeasureChars(
int widthLeft;
FontFamily *thisFamilyPtr;
Tcl_UniChar ch;
- char *rest;
+ CONST char *rest;
/*
* How many chars will fit in the space allotted?
@@ -835,7 +835,7 @@ Tk_MeasureChars(
*---------------------------------------------------------------------------
*/
-static char *
+static CONST char *
BreakLine(
FontFamily *familyPtr, /* FontFamily that describes the font values
* that are already selected into the graphics
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index 10e0659..c2d4e41 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixMenu.c,v 1.5 2001/10/12 13:30:31 tmh Exp $
+ * RCS: @(#) $Id: tkUnixMenu.c,v 1.6 2002/01/17 03:35:01 dgp Exp $
*/
#include "tkPort.h"
@@ -877,8 +877,8 @@ DrawMenuUnderline(menuPtr, mePtr, d, gc, tkfont, fmPtr, x, y, width, height)
int activeBorderWidth;
int leftEdge;
char *label = Tcl_GetStringFromObj(mePtr->labelPtr, NULL);
- char *start = Tcl_UtfAtIndex(label, mePtr->underline);
- char *end = Tcl_UtfNext(start);
+ CONST char *start = Tcl_UtfAtIndex(label, mePtr->underline);
+ CONST char *end = Tcl_UtfNext(start);
Tk_GetPixelsFromObj(NULL, menuPtr->tkwin,
menuPtr->activeBorderWidthPtr, &activeBorderWidth);
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index c814cda..31e7401 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinMenu.c,v 1.18 2002/01/08 15:40:15 drh Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.19 2002/01/17 03:35:01 dgp Exp $
*/
#define OEMRESOURCE
@@ -461,7 +461,7 @@ GetEntryText(mePtr)
: Tcl_GetStringFromObj(mePtr->labelPtr, NULL);
char *accel = (mePtr->accelPtr == NULL) ? ""
: Tcl_GetStringFromObj(mePtr->accelPtr, NULL);
- char *p, *next;
+ CONST char *p, *next;
Tcl_DString itemString;
/*
@@ -1728,8 +1728,8 @@ DrawMenuUnderline(
{
if (mePtr->underline >= 0) {
char *label = Tcl_GetStringFromObj(mePtr->labelPtr, NULL);
- char *start = Tcl_UtfAtIndex(label, mePtr->underline);
- char *end = Tcl_UtfNext(start);
+ CONST char *start = Tcl_UtfAtIndex(label, mePtr->underline);
+ CONST char *end = Tcl_UtfNext(start);
Tk_UnderlineChars(menuPtr->display, d,
gc, tkfont, label, x + mePtr->indicatorSpace,