summaryrefslogtreecommitdiffstats
path: root/generic/tkRectOval.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-04-16 01:51:06 (GMT)
committerstanton <stanton>1999-04-16 01:51:06 (GMT)
commit03656f44f81469f459031fa3a4a7b09c8bc77712 (patch)
tree31378e81bd58f8c726fc552d6b30cbf3ca07497b /generic/tkRectOval.c
parent404fc236f34304df53b7e44bc7971d786b87d453 (diff)
downloadtk-03656f44f81469f459031fa3a4a7b09c8bc77712.zip
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.gz
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.bz2
* Merged 8.1 branch into the main trunk
Diffstat (limited to 'generic/tkRectOval.c')
-rw-r--r--generic/tkRectOval.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c
index beba5a0..70556b4 100644
--- a/generic/tkRectOval.c
+++ b/generic/tkRectOval.c
@@ -5,12 +5,12 @@
* widgets.
*
* Copyright (c) 1991-1994 The Regents of the University of California.
- * Copyright (c) 1994-1996 Sun Microsystems, Inc.
+ * Copyright (c) 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkRectOval.c,v 1.2 1998/09/14 18:23:16 stanton Exp $
+ * RCS: @(#) $Id: tkRectOval.c,v 1.3 1999/04/16 01:51:21 stanton Exp $
*/
#include <stdio.h>
@@ -157,7 +157,7 @@ Tk_ItemType tkOvalType = {
* Results:
* A standard Tcl return value. If an error occurred in
* creating the item, then an error message is left in
- * interp->result; in this case itemPtr is left uninitialized,
+ * the interp's result; in this case itemPtr is left uninitialized,
* so it can be safely freed by the caller.
*
* Side effects:
@@ -230,7 +230,7 @@ CreateRectOval(interp, canvas, itemPtr, argc, argv)
* for details on what it does.
*
* Results:
- * Returns TCL_OK or TCL_ERROR, and sets interp->result.
+ * Returns TCL_OK or TCL_ERROR, and sets the interp's result.
*
* Side effects:
* The coordinates for the given item may be changed.
@@ -273,9 +273,10 @@ RectOvalCoords(interp, canvas, itemPtr, argc, argv)
}
ComputeRectOvalBbox(canvas, rectOvalPtr);
} else {
- sprintf(interp->result,
- "wrong # coordinates: expected 0 or 4, got %d",
- argc);
+ char buf[64 + TCL_INTEGER_SPACE];
+
+ sprintf(buf, "wrong # coordinates: expected 0 or 4, got %d", argc);
+ Tcl_SetResult(interp, buf, TCL_VOLATILE);
return TCL_ERROR;
}
return TCL_OK;
@@ -292,7 +293,7 @@ RectOvalCoords(interp, canvas, itemPtr, argc, argv)
*
* Results:
* A standard Tcl result code. If an error occurs, then
- * an error message is left in interp->result.
+ * an error message is left in the interp's result.
*
* Side effects:
* Configuration information, such as colors and stipple
@@ -942,7 +943,7 @@ TranslateRectOval(canvas, itemPtr, deltaX, deltaY)
* Results:
* The return value is a standard Tcl result. If an error
* occurs in generating Postscript then an error message is
- * left in interp->result, replacing whatever used to be there.
+ * left in the interp's result, replacing whatever used to be there.
* If no error occurs, then Postscript for the rectangle is
* appended to the result.
*
@@ -962,7 +963,7 @@ RectOvalToPostscript(interp, canvas, itemPtr, prepass)
* collect font information; 0 means
* final Postscript is being created. */
{
- char pathCmd[500], string[100];
+ char pathCmd[500];
RectOvalItem *rectOvalPtr = (RectOvalItem *) itemPtr;
double y1, y2;
@@ -1016,6 +1017,8 @@ RectOvalToPostscript(interp, canvas, itemPtr, prepass)
*/
if (rectOvalPtr->outlineColor != NULL) {
+ char string[32 + TCL_INTEGER_SPACE];
+
Tcl_AppendResult(interp, pathCmd, (char *) NULL);
sprintf(string, "%d setlinewidth", rectOvalPtr->width);
Tcl_AppendResult(interp, string,