summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-10-28 22:33:06 (GMT)
committernijtmans <nijtmans>2008-10-28 22:33:06 (GMT)
commitcfe62cbebc1beaa8564e7f7e4075c7b99763ac10 (patch)
treecf99f99a21277e0bc21da965946d8e129c1a5814 /generic/tkImgPhoto.c
parent66cc8f9b15845d8a5470409603feec48ee347d5f (diff)
downloadtk-cfe62cbebc1beaa8564e7f7e4075c7b99763ac10.zip
tk-cfe62cbebc1beaa8564e7f7e4075c7b99763ac10.tar.gz
tk-cfe62cbebc1beaa8564e7f7e4075c7b99763ac10.tar.bz2
CONSTify TkPrintPadAmount, TkCreateFrame, TkCreateMainWindow
and Tk_ParseArgv. move TkSelGetSelection to internal stub table (needed in tkWinTest.c)
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index b09682d..aefcf50 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -17,7 +17,7 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.83 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.84 2008/10/28 22:33:06 nijtmans Exp $
*/
#include "tkImgPhoto.h"
@@ -77,7 +77,7 @@ struct SubcommandOptions {
* of the OPT_* constants above.
*/
-static char *optionNames[] = {
+static const char *optionNames[] = {
"-background",
"-compositingrule",
"-format",
@@ -229,13 +229,13 @@ PhotoFormatThreadExitProc(
while (tsdPtr->oldFormatList != NULL) {
freePtr = tsdPtr->oldFormatList;
tsdPtr->oldFormatList = tsdPtr->oldFormatList->nextPtr;
- ckfree(freePtr->name);
+ ckfree((char *) freePtr->name);
ckfree((char *) freePtr);
}
while (tsdPtr->formatList != NULL) {
freePtr = tsdPtr->formatList;
tsdPtr->formatList = tsdPtr->formatList->nextPtr;
- ckfree(freePtr->name);
+ ckfree((char *) freePtr->name);
ckfree((char *) freePtr);
}
}
@@ -278,7 +278,7 @@ Tk_CreateOldPhotoImageFormat(
copyPtr = (Tk_PhotoImageFormat *) ckalloc(sizeof(Tk_PhotoImageFormat));
*copyPtr = *formatPtr;
copyPtr->name = ckalloc((unsigned) (strlen(formatPtr->name) + 1));
- strcpy(copyPtr->name, formatPtr->name);
+ strcpy((char *) copyPtr->name, formatPtr->name);
copyPtr->nextPtr = tsdPtr->oldFormatList;
tsdPtr->oldFormatList = copyPtr;
}
@@ -302,7 +302,7 @@ Tk_CreatePhotoImageFormat(
copyPtr = (Tk_PhotoImageFormat *) ckalloc(sizeof(Tk_PhotoImageFormat));
*copyPtr = *formatPtr;
copyPtr->name = ckalloc((unsigned) (strlen(formatPtr->name) + 1));
- strcpy(copyPtr->name, formatPtr->name);
+ strcpy((char *)copyPtr->name, formatPtr->name);
if (isupper((unsigned char) *formatPtr->name)) {
copyPtr->nextPtr = tsdPtr->oldFormatList;
tsdPtr->oldFormatList = copyPtr;
@@ -1401,7 +1401,8 @@ ParseSubcommandOptions(
{
int index, c, bit, currentBit, length;
int values[4], numValues, maxValues, argIndex;
- char *option, **listPtr;
+ char *option;
+ const char **listPtr;
for (index = *optIndexPtr; index < objc; *optIndexPtr = ++index) {
/*