summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-05-03 15:21:31 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-05-03 15:21:31 (GMT)
commitb4a1780d87be0a45798fe19a90a8317bf235404a (patch)
tree4b65e0e57b4ff5c4424e1dd85c980a9425cd118c /generic
parent458541e13fd91e5f1323f40e835d5d9fca59d32c (diff)
downloadtk-b4a1780d87be0a45798fe19a90a8317bf235404a.zip
tk-b4a1780d87be0a45798fe19a90a8317bf235404a.tar.gz
tk-b4a1780d87be0a45798fe19a90a8317bf235404a.tar.bz2
Tackle [Bug 1711985]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCanvPs.c22
-rw-r--r--generic/tkOption.c11
2 files changed, 16 insertions, 17 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 5fcdd15..a650d46 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.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: tkCanvPs.c,v 1.16 2005/11/04 15:23:05 dkf Exp $
+ * RCS: @(#) $Id: tkCanvPs.c,v 1.17 2007/05/03 15:21:32 dkf Exp $
*/
#include "tkInt.h"
@@ -161,7 +161,7 @@ TkCanvPostscriptCmd(
* this command enough to know that argv[1] is
* "postscript". */
{
- TkPostscriptInfo psInfo;
+ TkPostscriptInfo psInfo, *psInfoPtr = &psInfo;
Tk_PostscriptInfo oldInfoPtr;
int result;
Tk_Item *itemPtr;
@@ -191,7 +191,7 @@ TkCanvPostscriptCmd(
return result;
}
oldInfoPtr = canvasPtr->psInfo;
- canvasPtr->psInfo = (Tk_PostscriptInfo) &psInfo;
+ canvasPtr->psInfo = (Tk_PostscriptInfo) psInfoPtr;
psInfo.x = canvasPtr->xOrigin;
psInfo.y = canvasPtr->yOrigin;
psInfo.width = -1;
@@ -493,14 +493,14 @@ TkCanvPostscriptCmd(
Tcl_AppendResult(interp, string, NULL);
sprintf(string,
"%d %.15g moveto %d %.15g lineto %d %.15g lineto %d %.15g",
- psInfo.x,
- Tk_PostscriptY((double)psInfo.y, (Tk_PostscriptInfo)&psInfo),
- psInfo.x2,
- Tk_PostscriptY((double)psInfo.y, (Tk_PostscriptInfo)&psInfo),
- psInfo.x2,
- Tk_PostscriptY((double)psInfo.y2, (Tk_PostscriptInfo)&psInfo),
- psInfo.x,
- Tk_PostscriptY((double)psInfo.y2, (Tk_PostscriptInfo)&psInfo));
+ psInfo.x, Tk_PostscriptY((double)psInfo.y,
+ (Tk_PostscriptInfo)psInfoPtr),
+ psInfo.x2, Tk_PostscriptY((double)psInfo.y,
+ (Tk_PostscriptInfo)psInfoPtr),
+ psInfo.x2, Tk_PostscriptY((double)psInfo.y2,
+ (Tk_PostscriptInfo)psInfoPtr),
+ psInfo.x, Tk_PostscriptY((double)psInfo.y2,
+ (Tk_PostscriptInfo)psInfoPtr));
Tcl_AppendResult(interp, string,
" lineto closepath clip newpath\n", NULL);
}
diff --git a/generic/tkOption.c b/generic/tkOption.c
index b26e57e..b930f8c 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.19 2007/04/17 14:36:49 dkf Exp $
+ * RCS: @(#) $Id: tkOption.c,v 1.20 2007/05/03 15:21:32 dkf Exp $
*/
#include "tkPort.h"
@@ -1569,7 +1569,7 @@ GetDefaultOptions(
TkWindow *winPtr) /* Fetch option defaults for main window
* associated with this. */
{
- char *regProp;
+ char *regProp, **regPropPtr = &regProp;
int result, actualFormat;
unsigned long numItems, bytesAfter;
Atom actualType;
@@ -1580,10 +1580,9 @@ GetDefaultOptions(
regProp = NULL;
result = XGetWindowProperty(winPtr->display,
- RootWindow(winPtr->display, 0),
- XA_RESOURCE_MANAGER, 0, 100000,
- False, XA_STRING, &actualType, &actualFormat,
- &numItems, &bytesAfter, (unsigned char **) &regProp);
+ RootWindow(winPtr->display, 0), XA_RESOURCE_MANAGER, 0, 100000,
+ False, XA_STRING, &actualType, &actualFormat, &numItems,
+ &bytesAfter, (unsigned char **) regPropPtr);
if ((result == Success) && (actualType == XA_STRING)
&& (actualFormat == 8)) {