summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-11-05 22:48:58 (GMT)
committernijtmans <nijtmans>2008-11-05 22:48:58 (GMT)
commit427db2c1750f661db9ab7a64755592ae340c6c7c (patch)
tree01bfd4c701cdce4cf358e8bbc735ae929b1ab2f0 /unix
parentf047659e9e15c4db33c84d58ad1bff4af2ebf39c (diff)
downloadtk-427db2c1750f661db9ab7a64755592ae340c6c7c.zip
tk-427db2c1750f661db9ab7a64755592ae340c6c7c.tar.gz
tk-427db2c1750f661db9ab7a64755592ae340c6c7c.tar.bz2
CONSTify string and fileName parameters of TkGetBitmapData
more internal -Wwrite-string warning fixes
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixCursor.c12
-rw-r--r--unix/tkUnixSend.c49
2 files changed, 31 insertions, 30 deletions
diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c
index 103fd13..59c415a 100644
--- a/unix/tkUnixCursor.c
+++ b/unix/tkUnixCursor.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: tkUnixCursor.c,v 1.14 2008/04/27 22:39:13 dkf Exp $
+ * RCS: @(#) $Id: tkUnixCursor.c,v 1.15 2008/11/05 22:48:58 nijtmans Exp $
*/
#include "tkInt.h"
@@ -163,7 +163,7 @@ static const struct CursorName {
static const struct TkCursorName {
const char *name;
- char *data;
+ const char *data;
char *mask;
} tkCursorNames[] = {
{"none", CURSOR_NONE_DATA, NULL},
@@ -184,7 +184,7 @@ static const struct TkCursorName {
static Cursor CreateCursorFromTableOrFile(Tcl_Interp *interp,
Tk_Window tkwin, int argc, const char **argv,
const struct TkCursorName *tkCursorPtr);
-
+
/*
*----------------------------------------------------------------------
*
@@ -550,7 +550,7 @@ CreateCursorFromTableOrFile(
}
return cursor;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -600,7 +600,7 @@ TkCreateCursorFromData(
}
return (TkCursor *) cursorPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -627,7 +627,7 @@ TkpFreeCursor(
XFreeCursor(unixCursorPtr->display, (Cursor) unixCursorPtr->info.cursor);
Tk_FreeXId(unixCursorPtr->display, (XID) unixCursorPtr->info.cursor);
}
-
+
/*
* Local Variables:
* mode: c
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index 8427ee4..60cdf86 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.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: tkUnixSend.c,v 1.22 2008/07/23 23:24:46 nijtmans Exp $
+ * RCS: @(#) $Id: tkUnixSend.c,v 1.23 2008/11/05 22:48:58 nijtmans Exp $
*/
#include "tkUnixInt.h"
@@ -226,7 +226,7 @@ static int ServerSecure(TkDisplay *dispPtr);
static void UpdateCommWindow(TkDisplay *dispPtr);
static int ValidateName(TkDisplay *dispPtr, const char *name,
Window commWindow, int oldOK);
-
+
/*
*----------------------------------------------------------------------
*
@@ -325,7 +325,7 @@ RegOpen(
}
return regPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -378,7 +378,7 @@ RegFindName(
}
return None;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -442,7 +442,7 @@ RegDeleteName(
}
}
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -492,7 +492,7 @@ RegAddName(
regPtr->property = newProp;
regPtr->allocedByX = 0;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -552,7 +552,7 @@ RegClose(
}
ckfree((char *) regPtr);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -647,7 +647,7 @@ ValidateName(
}
return result;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -690,7 +690,7 @@ ServerSecure(
return secure;
#endif /* TK_NO_SECURITY */
}
-
+
/*
*--------------------------------------------------------------
*
@@ -849,7 +849,7 @@ Tk_SetAppName(
return riPtr->name;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -1087,7 +1087,7 @@ Tk_SendCmd(
if (!ValidateName(pending.dispPtr, pending.target,
pending.commWindow, 0)) {
- char *msg;
+ const char *msg;
if (ValidateName(pending.dispPtr, pending.target,
pending.commWindow, 1)) {
@@ -1137,7 +1137,7 @@ Tk_SendCmd(
Tcl_SetResult(interp, pending.result, TCL_DYNAMIC);
return pending.code;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1225,7 +1225,7 @@ TkGetInterpNames(
RegClose(regPtr);
return TCL_OK;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -1255,7 +1255,7 @@ TkSendCleanup(
dispPtr->commTkwin = NULL;
}
}
-
+
/*
*--------------------------------------------------------------
*
@@ -1312,7 +1312,7 @@ SendInit(
return TCL_OK;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -1340,7 +1340,7 @@ SendEventProc(
{
TkDisplay *dispPtr = clientData;
char *propInfo, **propInfoPtr = &propInfo;
- register char *p;
+ const char *p;
int result, actualFormat;
unsigned long numItems, bytesAfter;
Atom actualType;
@@ -1395,7 +1395,8 @@ SendEventProc(
if ((*p == 'c') && (p[1] == 0)) {
Window commWindow;
- char *interpName, *script, *serial, *end;
+ const char *interpName, *script, *serial;
+ char *end;
Tcl_DString reply;
RegisteredInterp *riPtr;
@@ -1550,7 +1551,7 @@ SendEventProc(
}
} else if ((*p == 'r') && (p[1] == 0)) {
int serial, code, gotSerial;
- char *errorInfo, *errorCode, *resultString;
+ const char *errorInfo, *errorCode, *resultString;
PendingCommand *pcPtr;
/*
@@ -1649,7 +1650,7 @@ SendEventProc(
}
XFree(propInfo);
}
-
+
/*
*--------------------------------------------------------------
*
@@ -1728,7 +1729,7 @@ AppendErrorProc(
}
return 0;
}
-
+
/*
*--------------------------------------------------------------
*
@@ -1777,7 +1778,7 @@ DeleteProc(
UpdateCommWindow(riPtr->dispPtr);
Tcl_EventuallyFree(riPtr, TCL_DYNAMIC);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1817,7 +1818,7 @@ SendRestrictProc(
}
return TK_DEFER_EVENT;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1857,7 +1858,7 @@ UpdateCommWindow(
Tcl_DStringLength(&names));
Tcl_DStringFree(&names);
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -1965,7 +1966,7 @@ TkpTestsendCmd(
}
return TCL_OK;
}
-
+
/*
* Local Variables:
* mode: c