summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-10-30 23:18:59 (GMT)
committernijtmans <nijtmans>2008-10-30 23:18:59 (GMT)
commitb80410a3176c80b33569bc238edd883bbb215f5f (patch)
tree9f94fbbc8e20c71db340e9aa5b02b47387bd82f0
parent6c42063c88d144a80955e80d2fa95fd934a8e708 (diff)
downloadtk-b80410a3176c80b33569bc238edd883bbb215f5f.zip
tk-b80410a3176c80b33569bc238edd883bbb215f5f.tar.gz
tk-b80410a3176c80b33569bc238edd883bbb215f5f.tar.bz2
more internal -Wwrite-strings warning fixes
-rw-r--r--ChangeLog19
-rw-r--r--generic/tkAtom.c15
-rw-r--r--generic/tkBusy.c5
-rw-r--r--generic/tkButton.c5
-rw-r--r--generic/tkCanvPoly.c24
-rw-r--r--generic/tkCanvText.c13
-rw-r--r--generic/tkCmds.c4
-rw-r--r--generic/tkListbox.c8
-rw-r--r--generic/tkMenu.c4
-rw-r--r--generic/tkOldConfig.c4
-rw-r--r--generic/tkOption.c6
-rw-r--r--generic/tkPanedWindow.c6
-rw-r--r--generic/tkPlace.c4
-rw-r--r--generic/tkScale.c6
-rw-r--r--generic/tkTest.c8
-rw-r--r--generic/tkText.c14
-rw-r--r--generic/tkTextImage.c26
17 files changed, 91 insertions, 80 deletions
diff --git a/ChangeLog b/ChangeLog
index 81830ea..050ae99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2008-10-30 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tkAtom.c: more internal -Wwrite-strings warning fixes
+ * generic/tkBusy.c (thanks, Joe, for fixing tkAtom.c, but this
+ * generic/tkButton.c is how it should have been fixed)
+ * generic/tkCanvPoly.c
+ * generic/tkCanvText.c
+ * generic/tkCmds.c
+ * generic/tkListbox.c
+ * generic/tkMenu.c
+ * generic/tkOldConfig.c
+ * generic/tkOption.c
+ * generic/tkPanedWindow.c
+ * generic/tkPlace.c
+ * generic/tkScale.c
+ * generic/tkTest.c
+ * generic/tkText.c
+ * generic/tkTextImage.c
+
2008-10-30 Don Porter <dgp@users.sourceforge.net>
* tests/unixSelect.test: Revise the unixSelect-1.* tests so that
diff --git a/generic/tkAtom.c b/generic/tkAtom.c
index 3afada9..a9503c7 100644
--- a/generic/tkAtom.c
+++ b/generic/tkAtom.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: tkAtom.c,v 1.10 2008/10/29 23:31:55 jenglish Exp $
+ * RCS: @(#) $Id: tkAtom.c,v 1.11 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -22,7 +22,7 @@
* those found in xatom.h
*/
-static const char * atomNameArray[] = {
+static const char *const atomNameArray[] = {
"PRIMARY", "SECONDARY", "ARC",
"ATOM", "BITMAP", "CARDINAL",
"COLORMAP", "CURSOR", "CUT_BUFFER0",
@@ -139,23 +139,22 @@ Tk_GetAtomName(
hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, (char *) atom);
if (hPtr == NULL) {
- char *name;
+ const char *name;
Tk_ErrorHandler handler;
- int isNew, mustFree;
+ int isNew;
+ char *mustFree = NULL;
handler = Tk_CreateErrorHandler(dispPtr->display, BadAtom, -1, -1,
NULL, (ClientData) NULL);
- name = XGetAtomName(dispPtr->display, atom);
- mustFree = 1;
+ name = mustFree = XGetAtomName(dispPtr->display, atom);
if (name == NULL) {
name = "?bad atom?";
- mustFree = 0;
}
Tk_DeleteErrorHandler(handler);
hPtr = Tcl_CreateHashEntry(&dispPtr->nameTable, name, &isNew);
Tcl_SetHashValue(hPtr, atom);
if (mustFree) {
- XFree(name);
+ XFree(mustFree);
}
name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr);
hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, (char *) atom, &isNew);
diff --git a/generic/tkBusy.c b/generic/tkBusy.c
index 5536b2d..46c647c 100644
--- a/generic/tkBusy.c
+++ b/generic/tkBusy.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: tkBusy.c,v 1.4 2008/10/20 12:22:20 dkf Exp $
+ * RCS: @(#) $Id: tkBusy.c,v 1.5 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -520,7 +520,8 @@ CreateBusy(
{
Busy *busyPtr;
int length, x, y;
- char *fmt, *name;
+ const char *fmt;
+ char *name;
Tk_Window tkBusy, tkChild, tkParent;
Window parent;
Tk_FakeWin *winPtr;
diff --git a/generic/tkButton.c b/generic/tkButton.c
index 6bae8b7..2eb889e 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.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: tkButton.c,v 1.31 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkButton.c,v 1.32 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -1594,7 +1594,8 @@ ButtonVarProc(
int flags) /* Information about what happened. */
{
register TkButton *butPtr = (TkButton *) clientData;
- char *name, *value;
+ char *name;
+ const char *value;
Tcl_Obj *valuePtr;
name = Tcl_GetString(butPtr->selVarNamePtr);
diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c
index 8050857..d5e63d8 100644
--- a/generic/tkCanvPoly.c
+++ b/generic/tkCanvPoly.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: tkCanvPoly.c,v 1.19 2008/04/27 22:38:55 dkf Exp $
+ * RCS: @(#) $Id: tkCanvPoly.c,v 1.20 2008/10/30 23:18:59 nijtmans Exp $
*/
#include <stdio.h>
@@ -58,29 +58,23 @@ typedef struct PolygonItem {
*/
static Tk_CustomOption smoothOption = {
- (Tk_OptionParseProc *) TkSmoothParseProc,
- TkSmoothPrintProc, (ClientData) NULL
+ TkSmoothParseProc, TkSmoothPrintProc, (ClientData) NULL
};
static Tk_CustomOption stateOption = {
- (Tk_OptionParseProc *) TkStateParseProc,
- TkStatePrintProc, (ClientData) 2
+ TkStateParseProc, TkStatePrintProc, (ClientData) 2
};
static Tk_CustomOption tagsOption = {
- (Tk_OptionParseProc *) Tk_CanvasTagsParseProc,
- Tk_CanvasTagsPrintProc, (ClientData) NULL
+ Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL
};
static Tk_CustomOption dashOption = {
- (Tk_OptionParseProc *) TkCanvasDashParseProc,
- TkCanvasDashPrintProc, (ClientData) NULL
+ TkCanvasDashParseProc, TkCanvasDashPrintProc, (ClientData) NULL
};
static Tk_CustomOption offsetOption = {
- (Tk_OptionParseProc *) TkOffsetParseProc,
- TkOffsetPrintProc,
+ TkOffsetParseProc, TkOffsetPrintProc,
(ClientData) (TK_OFFSET_RELATIVE|TK_OFFSET_INDEX)
};
static Tk_CustomOption pixelOption = {
- (Tk_OptionParseProc *) TkPixelParseProc,
- TkPixelPrintProc, (ClientData) NULL
+ TkPixelParseProc, TkPixelPrintProc, (ClientData) NULL
};
static Tk_ConfigSpec configSpecs[] = {
@@ -526,7 +520,7 @@ ConfigurePolygon(
* Mac OS X CG drawing needs access to the outline linewidth
* even for fills (as linewidth controls antialiasing).
*/
- gcValues.line_width = polyPtr->outline.gc != None ?
+ gcValues.line_width = polyPtr->outline.gc != None ?
polyPtr->outline.gc->line_width : 0;
mask |= GCLineWidth;
#endif
@@ -1807,7 +1801,7 @@ PolygonToPostscript(
* being created. */
{
PolygonItem *polyPtr = (PolygonItem *) itemPtr;
- char *style;
+ const char *style;
XColor *color;
XColor *fillColor;
Pixmap stipple;
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index 21987f7..50fbebd 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.29 2008/10/03 15:37:13 dkf Exp $
+ * RCS: @(#) $Id: tkCanvText.c,v 1.30 2008/10/30 23:18:59 nijtmans Exp $
*/
#include <stdio.h>
@@ -85,16 +85,13 @@ typedef struct TextItem {
*/
static Tk_CustomOption stateOption = {
- (Tk_OptionParseProc *) TkStateParseProc,
- TkStatePrintProc, (ClientData) 2
+ TkStateParseProc, TkStatePrintProc, (ClientData) 2
};
static Tk_CustomOption tagsOption = {
- (Tk_OptionParseProc *) Tk_CanvasTagsParseProc,
- Tk_CanvasTagsPrintProc, (ClientData) NULL
+ Tk_CanvasTagsParseProc, Tk_CanvasTagsPrintProc, (ClientData) NULL
};
static Tk_CustomOption offsetOption = {
- (Tk_OptionParseProc *) TkOffsetParseProc,
- TkOffsetPrintProc, (ClientData) (TK_OFFSET_RELATIVE)
+ TkOffsetParseProc, TkOffsetPrintProc, (ClientData) (TK_OFFSET_RELATIVE)
};
static Tk_ConfigSpec configSpecs[] = {
@@ -1431,7 +1428,7 @@ TextToPostscript(
TextItem *textPtr = (TextItem *) itemPtr;
int x, y;
Tk_FontMetrics fm;
- char *justify;
+ const char *justify;
char buffer[500];
XColor *color;
Pixmap stipple;
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index 83a6ecc..6038f17 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.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: tkCmds.c,v 1.46 2008/10/18 14:22:21 dkf Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.47 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -1200,7 +1200,7 @@ Tk_WinfoObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int index, x, y, width, height, useX, useY, class, skip;
- char *string;
+ const char *string;
TkWindow *winPtr;
Tk_Window tkwin;
diff --git a/generic/tkListbox.c b/generic/tkListbox.c
index b35d6ea..54deb14 100644
--- a/generic/tkListbox.c
+++ b/generic/tkListbox.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: tkListbox.c,v 1.50 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkListbox.c,v 1.51 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "default.h"
@@ -213,7 +213,7 @@ enum state {
STATE_DISABLED, STATE_NORMAL
};
-static char *stateStrings[] = {
+static const char *const stateStrings[] = {
"disabled", "normal", NULL
};
@@ -221,7 +221,7 @@ enum activeStyle {
ACTIVE_STYLE_DOTBOX, ACTIVE_STYLE_NONE, ACTIVE_STYLE_UNDERLINE
};
-static char *activeStyleStrings[] = {
+static const char *const activeStyleStrings[] = {
"dotbox", "none", "underline", NULL
};
@@ -3408,7 +3408,7 @@ ListboxListVarProc(
if (Tcl_ListObjLength(listPtr->interp, varListObj, &i) != TCL_OK) {
Tcl_SetVar2Ex(interp, listPtr->listVarName, NULL, oldListObj,
TCL_GLOBAL_ONLY);
- return "invalid listvar value";
+ return (char *) "invalid listvar value";
}
listPtr->listObj = varListObj;
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 8ae6518..85e1034 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.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: tkMenu.c,v 1.45 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.46 2008/10/30 23:18:59 nijtmans Exp $
*/
/*
@@ -110,7 +110,7 @@ static const char *const menuEntryTypeStrings[] = {
* is used with the "enum compound" declaration in tkMenu.h
*/
-static char *const compoundStrings[] = {
+static const char *const compoundStrings[] = {
"bottom", "center", "left", "none", "right", "top", NULL
};
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c
index 37d278d..0639817 100644
--- a/generic/tkOldConfig.c
+++ b/generic/tkOldConfig.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: tkOldConfig.c,v 1.24 2008/04/27 22:38:56 dkf Exp $
+ * RCS: @(#) $Id: tkOldConfig.c,v 1.25 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkPort.h"
@@ -607,7 +607,7 @@ Tk_ConfigureInfo(
register Tk_ConfigSpec *specPtr;
int needFlags, hateFlags;
char *list;
- char *leader = "{";
+ const char *leader = "{";
needFlags = flags & ~(TK_CONFIG_USER_BIT - 1);
if (Tk_Depth(tkwin) <= 1) {
diff --git a/generic/tkOption.c b/generic/tkOption.c
index 3688709..8d83ede 100644
--- a/generic/tkOption.c
+++ b/generic/tkOption.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: tkOption.c,v 1.27 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkOption.c,v 1.28 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -225,7 +225,7 @@ static void OptionThreadExitProc(ClientData clientData);
static void OptionInit(TkMainInfo *mainPtr);
static int ParsePriority(Tcl_Interp *interp, char *string);
static int ReadOptionFile(Tcl_Interp *interp, Tk_Window tkwin,
- char *fileName, int priority);
+ const char *fileName, int priority);
static void SetupStacks(TkWindow *winPtr, int leaf);
/*
@@ -1067,7 +1067,7 @@ ReadOptionFile(
Tcl_Interp *interp, /* Interpreter to use for reporting results. */
Tk_Window tkwin, /* Token for window: options are entered for
* this window's main window. */
- char *fileName, /* Name of file containing options. */
+ const char *fileName, /* Name of file containing options. */
int priority) /* Priority level to use for options in this
* file, such as TK_USER_DEFAULT_PRIO or
* TK_INTERACTIVE_PRIO. Must be between 0 and
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index d9b5cad..592d726 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.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: tkPanedWindow.c,v 1.35 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.36 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "default.h"
@@ -37,7 +37,7 @@
* The following table defines the legal values for the -orient option.
*/
-static char *orientStrings[] = {
+static const char *const orientStrings[] = {
"horizontal", "vertical", NULL
};
@@ -47,7 +47,7 @@ enum orient { ORIENT_HORIZONTAL, ORIENT_VERTICAL };
* The following table defines the legal values for the -stretch option.
*/
-static char *stretchStrings[] = {
+static const char *const stretchStrings[] = {
"always", "first", "last", "middle", "never", NULL
};
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index 649d490..4989258 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.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: tkPlace.c,v 1.26 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkPlace.c,v 1.27 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -26,7 +26,7 @@
* actual window size.
*/
-static char *borderModeStrings[] = {
+static const char *const borderModeStrings[] = {
"inside", "outside", "ignore", NULL
};
diff --git a/generic/tkScale.c b/generic/tkScale.c
index d42d4de..374cc1e 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkScale.c,v 1.31 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkScale.c,v 1.32 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "default.h"
@@ -1176,7 +1176,7 @@ ScaleVarProc(
int flags) /* Information about what happened. */
{
register TkScale *scalePtr = clientData;
- char *resultStr;
+ const char *resultStr;
double value;
Tcl_Obj *valuePtr;
int result;
@@ -1227,7 +1227,7 @@ ScaleVarProc(
}
TkEventuallyRedrawScale(scalePtr, REDRAW_SLIDER);
- return resultStr;
+ return (char *) resultStr;
}
/*
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 2f233e7..cba8546 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.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: tkTest.c,v 1.39 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.40 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkInt.h"
@@ -699,7 +699,7 @@ TestobjconfigObjCmd(
Tcl_Obj *customPtr;
} TypesRecord;
TypesRecord *recordPtr;
- static char *stringTable[] = {
+ static const char *const stringTable[] = {
"one", "two", "three", "four", NULL
};
static const Tk_OptionSpec typesSpecs[] = {
@@ -972,7 +972,7 @@ TestobjconfigObjCmd(
char *custom;
} InternalRecord;
InternalRecord *recordPtr;
- static char *internalStringTable[] = {
+ static const char *const internalStringTable[] = {
"one", "two", "three", "four", NULL
};
static const Tk_OptionSpec internalSpecs[] = {
@@ -1502,7 +1502,7 @@ ImageCreate(
* will be returned in later callbacks. */
{
TImageMaster *timPtr;
- char *varName;
+ const char *varName;
int i;
varName = "log";
diff --git a/generic/tkText.c b/generic/tkText.c
index 21ac016..eed86c5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.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: tkText.c,v 1.82 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.83 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "default.h"
@@ -50,7 +50,7 @@
* table below.
*/
-static char *stateStrings[] = {
+static const char *const stateStrings[] = {
"disabled", "normal", NULL
};
@@ -60,7 +60,7 @@ static char *stateStrings[] = {
* table below.
*/
-static char *wrapStrings[] = {
+static const char *const wrapStrings[] = {
"char", "none", "word", NULL
};
@@ -70,7 +70,7 @@ static char *wrapStrings[] = {
* the string table below.
*/
-static char *tabStyleStrings[] = {
+static const char *const tabStyleStrings[] = {
"tabular", "wordprocessor", NULL
};
@@ -4685,7 +4685,7 @@ DumpLine(
}
} else if ((offset >= startByte)) {
if ((what & TK_DUMP_MARK) && (segPtr->typePtr->name[0] == 'm')) {
- char *name;
+ const char *name;
TkTextMark *markPtr = (TkTextMark *) &segPtr->body;
if (segPtr == textPtr->insertMarkPtr) {
@@ -4717,7 +4717,7 @@ DumpLine(
} else if ((what & TK_DUMP_IMG) &&
(segPtr->typePtr->name[0] == 'i')) {
TkTextEmbImage *eiPtr = (TkTextEmbImage *)&segPtr->body;
- char *name = (eiPtr->name == NULL) ? "" : eiPtr->name;
+ const char *name = (eiPtr->name == NULL) ? "" : eiPtr->name;
TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr,
lineno, offset, &index);
@@ -4726,7 +4726,7 @@ DumpLine(
} else if ((what & TK_DUMP_WIN) &&
(segPtr->typePtr->name[0] == 'w')) {
TkTextEmbWindow *ewPtr = (TkTextEmbWindow *)&segPtr->body;
- char *pathname;
+ const char *pathname;
if (ewPtr->tkwin == (Tk_Window) NULL) {
pathname = "";
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 9e9867c..6f38943 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.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: tkTextImage.c,v 1.24 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkTextImage.c,v 1.25 2008/10/30 23:18:59 nijtmans Exp $
*/
#include "tkPort.h"
@@ -71,7 +71,7 @@ static const Tk_SegType tkTextEmbImageType = {
* Definitions for alignment values:
*/
-static char *alignStrings[] = {
+static const char *const alignStrings[] = {
"baseline", "bottom", "center", "top", NULL
};
@@ -100,7 +100,7 @@ static const Tk_OptionSpec optionSpecs[] = {
{TK_OPTION_END}
};
-
+
/*
*--------------------------------------------------------------
*
@@ -292,7 +292,7 @@ TkTextImageCmd(
}
return TCL_ERROR;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -420,7 +420,7 @@ EmbImageConfigure(
return TCL_OK;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -475,7 +475,7 @@ EmbImageDeleteProc(
ckfree((char *) eiPtr);
return 0;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -501,7 +501,7 @@ EmbImageCleanupProc(
eiPtr->body.ei.linePtr = linePtr;
return eiPtr;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -589,7 +589,7 @@ EmbImageLayoutProc(
eiPtr->body.ei.chunkCount += 1;
return 1;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -621,7 +621,7 @@ EmbImageCheckProc(
eiPtr->size);
}
}
-
+
/*
*--------------------------------------------------------------
*
@@ -680,7 +680,7 @@ EmbImageDisplayProc(
Tk_RedrawImage(image, 0, 0, width, height, dst, imageX, imageY);
}
-
+
/*
*--------------------------------------------------------------
*
@@ -749,7 +749,7 @@ EmbImageBboxProc(
break;
}
}
-
+
/*
*--------------------------------------------------------------
*
@@ -788,7 +788,7 @@ TkTextImageIndex(
indexPtr->byteIndex = TkTextSegToOffset(eiPtr, indexPtr->linePtr);
return 1;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -833,7 +833,7 @@ EmbImageProc(
TkTextInvalidateLineMetrics(eiPtr->body.ei.sharedTextPtr, NULL,
index.linePtr, 0, TK_TEXT_INVALIDATE_ONLY);
}
-
+
/*
* Local Variables:
* mode: c