summaryrefslogtreecommitdiffstats
path: root/mac/tkMacCursor.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 /mac/tkMacCursor.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 'mac/tkMacCursor.c')
-rw-r--r--mac/tkMacCursor.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/mac/tkMacCursor.c b/mac/tkMacCursor.c
index 604e8f0..f03f207 100644
--- a/mac/tkMacCursor.c
+++ b/mac/tkMacCursor.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacCursor.c,v 1.4 1999/03/10 07:04:44 stanton Exp $
+ * RCS: @(#) $Id: tkMacCursor.c,v 1.5 1999/04/16 01:51:30 stanton Exp $
*/
#include "tkPort.h"
@@ -109,13 +109,23 @@ FindCursorByName(
{
Handle resource;
Str255 curName;
+ int destWrote, inCurLen;
- curName[0] = strlen(string);
- if (curName[0] > 255) {
+ inCurLen = strlen(string);
+ if (inCurLen > 255) {
return;
}
-
- strcpy((char *) curName + 1, string);
+
+ /*
+ * macRoman is the encoding that the resource fork uses.
+ */
+
+ Tcl_UtfToExternal(NULL, Tcl_GetEncoding(NULL, "macRoman"), string,
+ inCurLen, 0, NULL,
+ (char *) &curName[1],
+ 255, NULL, &destWrote, NULL); /* Internalize native */
+ curName[0] = destWrote;
+
resource = GetNamedResource('crsr', curName);
if (resource != NULL) {
@@ -252,7 +262,7 @@ TkCreateCursorFromData(
/*
*----------------------------------------------------------------------
*
- * TkFreeCursor --
+ * TkpFreeCursor --
*
* This procedure is called to release a cursor allocated by
* TkGetCursorByName.
@@ -267,7 +277,7 @@ TkCreateCursorFromData(
*/
void
-TkFreeCursor(
+TkpFreeCursor(
TkCursor *cursorPtr)
{
TkMacCursor *macCursorPtr = (TkMacCursor *) cursorPtr;
@@ -284,8 +294,6 @@ TkFreeCursor(
if (macCursorPtr == gCurrentCursor) {
gCurrentCursor = NULL;
}
-
- ckfree((char *) macCursorPtr);
}
/*