summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-09-07 13:52:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-09-07 13:52:33 (GMT)
commitf47401ce9e868d337ae9d4f809a1c35f64968315 (patch)
tree01d5267f47756358010b2b6247e6d7cece370364 /generic
parentf467766feb1b0367230cad38ed99f64a1aa08694 (diff)
parentddb8c75c2fe1fdcf3a024bfdb129eb6d26ac3b24 (diff)
downloadtk-f47401ce9e868d337ae9d4f809a1c35f64968315.zip
tk-f47401ce9e868d337ae9d4f809a1c35f64968315.tar.gz
tk-f47401ce9e868d337ae9d4f809a1c35f64968315.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCanvPs.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 6542864..0c7b0dd 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -170,7 +170,6 @@ TkCanvPostscriptCmd(
TkPostscriptInfo psInfo, *psInfoPtr = &psInfo;
Tk_PostscriptInfo oldInfoPtr;
int result;
- int written;
Tk_Item *itemPtr;
#define STRING_LENGTH 400
const char *p;
@@ -492,8 +491,7 @@ TkCanvPostscriptCmd(
Tcl_AppendObjToObj(psObj, preambleObj);
if (psInfo.chan != NULL) {
- written = Tcl_WriteObj(psInfo.chan, psObj);
- if (written == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
channelWriteFailed:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"problem writing postscript data to channel: %s",
@@ -547,8 +545,7 @@ TkCanvPostscriptCmd(
psInfo.x, Tk_PostscriptY((double)psInfo.y2,
(Tk_PostscriptInfo)psInfoPtr));
if (psInfo.chan != NULL) {
- written = Tcl_WriteObj(psInfo.chan, psObj);
- if (written == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
goto channelWriteFailed;
}
Tcl_DecrRefCount(psObj);
@@ -590,8 +587,7 @@ TkCanvPostscriptCmd(
Tcl_AppendToObj(psObj, "grestore\n", -1);
if (psInfo.chan != NULL) {
- written = Tcl_WriteObj(psInfo.chan, psObj);
- if (written == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
goto channelWriteFailed;
}
Tcl_DecrRefCount(psObj);
@@ -612,8 +608,7 @@ TkCanvPostscriptCmd(
"%%EOF\n", -1);
if (psInfo.chan != NULL) {
- Tcl_WriteObj(psInfo.chan, psObj);
- if (written == -1) {
+ if (Tcl_WriteObj(psInfo.chan, psObj) == -1) {
goto channelWriteFailed;
}
}