summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixCursor.c
diff options
context:
space:
mode:
authorstanton <stanton@noemail.net>1998-09-29 00:25:04 (GMT)
committerstanton <stanton@noemail.net>1998-09-29 00:25:04 (GMT)
commitf110d4e2a4b45b23f037e22b18041093a18a028f (patch)
tree99c199f65b7d32755dc8f0ee5cc773bd922a74a6 /unix/tkUnixCursor.c
parent44fe62a9cda522475be53f14654970aaa3d4a648 (diff)
downloadtk-f110d4e2a4b45b23f037e22b18041093a18a028f.zip
tk-f110d4e2a4b45b23f037e22b18041093a18a028f.tar.gz
tk-f110d4e2a4b45b23f037e22b18041093a18a028f.tar.bz2
initial tk8.1a2 version
FossilOrigin-Name: 644396f2dabc649ad5784768cfe962017d991df1
Diffstat (limited to 'unix/tkUnixCursor.c')
-rw-r--r--unix/tkUnixCursor.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c
index da75ac6..46000df 100644
--- a/unix/tkUnixCursor.c
+++ b/unix/tkUnixCursor.c
@@ -3,12 +3,12 @@
*
* This file contains X specific cursor manipulation routines.
*
- * Copyright (c) 1995 Sun Microsystems, Inc.
+ * Copyright (c) 1995-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.
*
- * SCCS: @(#) tkUnixCursor.c 1.4 96/10/08 09:33:08
+ * SCCS: @(#) tkUnixCursor.c 1.7 98/02/04 13:56:12
*/
#include "tkPort.h"
@@ -218,7 +218,7 @@ TkGetCursorByName(interp, tkwin, string)
if (dispPtr->cursorFont == None) {
dispPtr->cursorFont = XLoadFont(display, CURSORFONT);
if (dispPtr->cursorFont == None) {
- interp->result = "couldn't load cursor font";
+ Tcl_SetResult(interp, "couldn't load cursor font", TCL_STATIC);
goto cleanup;
}
}
@@ -282,8 +282,9 @@ TkGetCursorByName(interp, tkwin, string)
goto cleanup;
}
if ((maskWidth != width) && (maskHeight != height)) {
- interp->result =
- "source and mask bitmaps have different sizes";
+ Tcl_SetResult(interp,
+ "source and mask bitmaps have different sizes",
+ TCL_STATIC);
goto cleanup;
}
if (XParseColor(display, Tk_Colormap(tkwin), argv[2],
@@ -323,6 +324,9 @@ TkGetCursorByName(interp, tkwin, string)
badString:
+ if (argv) {
+ ckfree((char *) argv);
+ }
Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"",
(char *) NULL);
return NULL;
@@ -382,7 +386,7 @@ TkCreateCursorFromData(tkwin, source, mask, width, height, xHot, yHot,
/*
*----------------------------------------------------------------------
*
- * TkFreeCursor --
+ * TkpFreeCursor --
*
* This procedure is called to release a cursor allocated by
* TkGetCursorByName.
@@ -397,11 +401,10 @@ TkCreateCursorFromData(tkwin, source, mask, width, height, xHot, yHot,
*/
void
-TkFreeCursor(cursorPtr)
+TkpFreeCursor(cursorPtr)
TkCursor *cursorPtr;
{
TkUnixCursor *unixCursorPtr = (TkUnixCursor *) cursorPtr;
XFreeCursor(unixCursorPtr->display, (Cursor) unixCursorPtr->info.cursor);
Tk_FreeXId(unixCursorPtr->display, (XID) unixCursorPtr->info.cursor);
- ckfree((char *) unixCursorPtr);
}