summaryrefslogtreecommitdiffstats
path: root/generic/tkImgBmap.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/tkImgBmap.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/tkImgBmap.c')
-rw-r--r--generic/tkImgBmap.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index d7be9de..093abac 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkImgBmap.c,v 1.5 1999/02/04 20:56:15 stanton Exp $
+ * RCS: @(#) $Id: tkImgBmap.c,v 1.6 1999/04/16 01:51:15 stanton Exp $
*/
#include "tkInt.h"
@@ -227,7 +227,7 @@ ImgBmapCreate(interp, name, argc, argv, typePtr, master, clientDataPtr)
*
* Results:
* A standard Tcl return value. If TCL_ERROR is returned then
- * an error message is left in masterPtr->interp->result.
+ * an error message is left in the masterPtr->interp's result.
*
* Side effects:
* Existing instances of the image will be redisplayed to match
@@ -278,7 +278,8 @@ ImgBmapConfigureMaster(masterPtr, argc, argv, flags)
if ((masterPtr->maskFileString != NULL)
|| (masterPtr->maskDataString != NULL)) {
if (masterPtr->data == NULL) {
- masterPtr->interp->result = "can't have mask without bitmap";
+ Tcl_SetResult(masterPtr->interp, "can't have mask without bitmap",
+ TCL_STATIC);
return TCL_ERROR;
}
masterPtr->maskData = TkGetBitmapData(masterPtr->interp,
@@ -291,7 +292,8 @@ ImgBmapConfigureMaster(masterPtr, argc, argv, flags)
|| (maskHeight != masterPtr->height)) {
ckfree(masterPtr->maskData);
masterPtr->maskData = NULL;
- masterPtr->interp->result = "bitmap and mask have different sizes";
+ Tcl_SetResult(masterPtr->interp,
+ "bitmap and mask have different sizes", TCL_STATIC);
return TCL_ERROR;
}
}
@@ -459,7 +461,7 @@ ImgBmapConfigureInstance(instancePtr)
* *heightPtr. *hotXPtr and *hotYPtr are set to the bitmap
* hotspot if one is defined, otherwise they are set to -1, -1.
* If an error occurred, NULL is returned and an error message is
- * left in interp->result.
+ * left in the interp's result.
*
* Side effects:
* A bitmap is created.
@@ -628,9 +630,8 @@ TkGetBitmapData(interp, string, fileName, widthPtr, heightPtr,
return data;
error:
- if (interp != NULL) {
- interp->result = "format error in bitmap data";
- }
+ Tcl_SetResult(interp, "format error in bitmap data", TCL_STATIC);
+
errorCleanup:
if (data != NULL) {
ckfree(data);
@@ -740,9 +741,8 @@ ImgBmapCmd(clientData, interp, argc, argv)
size_t length;
if (argc < 2) {
- sprintf(interp->result,
- "wrong # args: should be \"%.50s option ?arg arg ...?\"",
- argv[0]);
+ Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
+ " option ?arg arg ...?\"", (char *) NULL);
return TCL_ERROR;
}
c = argv[1][0];