summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvImg.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkCanvImg.c')
-rw-r--r--generic/tkCanvImg.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 0432bd7..cf1106d 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -4,12 +4,12 @@
* This file implements image items for canvas widgets.
*
* Copyright (c) 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: tkCanvImg.c,v 1.2 1998/09/14 18:23:05 stanton Exp $
+ * RCS: @(#) $Id: tkCanvImg.c,v 1.3 1999/04/16 01:51:11 stanton Exp $
*/
#include <stdio.h>
@@ -126,7 +126,7 @@ Tk_ItemType tkImageType = {
* 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:
@@ -190,7 +190,7 @@ CreateImage(interp, canvas, itemPtr, argc, argv)
* 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.
@@ -224,8 +224,10 @@ ImageCoords(interp, canvas, itemPtr, argc, argv)
}
ComputeImageBbox(canvas, imgPtr);
} else {
- sprintf(interp->result,
- "wrong # coordinates: expected 0 or 2, got %d", argc);
+ char buf[64];
+
+ sprintf(buf, "wrong # coordinates: expected 0 or 2, got %d", argc);
+ Tcl_SetResult(interp, buf, TCL_VOLATILE);
return TCL_ERROR;
}
return TCL_OK;
@@ -241,7 +243,7 @@ ImageCoords(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 may be set for itemPtr.