summaryrefslogtreecommitdiffstats
path: root/win/tkWinCursor.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-24 19:41:30 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-24 19:41:30 (GMT)
commita161a378971b948143b658e432ce13b723c25f89 (patch)
tree27a19c720909b8a4b9391764f0bf7e7598f9df24 /win/tkWinCursor.c
parenta7cecb5c00243f374eaf3d64c5905042633e888b (diff)
downloadtk-a161a378971b948143b658e432ce13b723c25f89.zip
tk-a161a378971b948143b658e432ce13b723c25f89.tar.gz
tk-a161a378971b948143b658e432ce13b723c25f89.tar.bz2
a few more places
Diffstat (limited to 'win/tkWinCursor.c')
-rw-r--r--win/tkWinCursor.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c
index 8366db3..e7dbc65 100644
--- a/win/tkWinCursor.c
+++ b/win/tkWinCursor.c
@@ -72,8 +72,7 @@ static struct CursorName {
*/
#define TK_DEFAULT_CURSOR IDC_ARROW
-
-
+
/*
*----------------------------------------------------------------------
*
@@ -131,8 +130,9 @@ TkGetCursorByName(
*/
if (Tcl_IsSafe(interp)) {
- Tcl_AppendResult(interp, "can't get cursor from a file in",
- " a safe interpreter", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "can't get cursor from a file in a safe interpreter",-1));
+ Tcl_SetErrorCode(interp, "TK", "CURSOR", "SAFE", NULL);
ckfree(argv);
ckfree(cursorPtr);
return NULL;
@@ -166,13 +166,15 @@ TkGetCursorByName(
ckfree(cursorPtr);
badCursorSpec:
ckfree(argv);
- Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "bad cursor spec \"%s\"", string));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "CURSOR", NULL);
return NULL;
}
ckfree(argv);
return (TkCursor *) cursorPtr;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -201,7 +203,7 @@ TkCreateCursorFromData(
{
return NULL;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -225,7 +227,7 @@ TkpFreeCursor(
{
/* TkWinCursor *winCursorPtr = (TkWinCursor *) cursorPtr; */
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -260,7 +262,7 @@ TkpSetCursor(
SetCursor(hcursor);
}
}
-
+
/*
* Local Variables:
* mode: c