diff options
Diffstat (limited to 'generic/tkCmds.c')
-rw-r--r-- | generic/tkCmds.c | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 28da6e4..e84ba83 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -11,14 +11,14 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCmds.c,v 1.30 2002/08/31 06:12:20 das Exp $ + * RCS: @(#) $Id: tkCmds.c,v 1.31 2002/09/02 19:16:23 hobbs Exp $ */ #include "tkPort.h" #include "tkInt.h" #include <errno.h> -#if defined(__WIN32__) +#if defined(WIN32) #include "tkWinInt.h" #elif defined(MAC_TCL) #include "tkMacInt.h" @@ -644,6 +644,13 @@ Tk_TkObjCmd(clientData, interp, objc, objv) TkWindow *winPtr; char *string; + if (Tcl_IsSafe(interp)) { + Tcl_SetResult(interp, + "appname not accessible in a safe interpreter", + TCL_STATIC); + return TCL_ERROR; + } + winPtr = (TkWindow *) tkwin; if (objc > 3) { @@ -741,6 +748,13 @@ Tk_TkObjCmd(clientData, interp, objc, objv) int skip, width, height; double d; + if (Tcl_IsSafe(interp)) { + Tcl_SetResult(interp, + "scaling not accessible in a safe interpreter", + TCL_STATIC); + return TCL_ERROR; + } + screenPtr = Tk_Screen(tkwin); skip = TkGetDisplayOf(interp, objc - 2, objv + 2, &tkwin); @@ -778,6 +792,13 @@ Tk_TkObjCmd(clientData, interp, objc, objv) TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; int skip; + if (Tcl_IsSafe(interp)) { + Tcl_SetResult(interp, + "useinputmethods not accessible in a safe interpreter", + TCL_STATIC); + return TCL_ERROR; + } + skip = TkGetDisplayOf(interp, objc-2, objv+2, &tkwin); if (skip < 0) { return TCL_ERROR; @@ -819,15 +840,15 @@ Tk_TkObjCmd(clientData, interp, objc, objv) Tcl_WrongNumArgs(interp, 2, objv, NULL); return TCL_ERROR; } - #if defined(__WIN32__) || defined(_WIN32) +#if defined(WIN32) windowingsystem = "win32"; - #elif defined(MAC_TCL) +#elif defined(MAC_TCL) windowingsystem = "classic"; - #elif defined(MAC_OSX_TK) +#elif defined(MAC_OSX_TK) windowingsystem = "aqua"; - #else +#else windowingsystem = "x11"; - #endif +#endif Tcl_SetStringObj(Tcl_GetObjResult(interp), windowingsystem, -1); break; } |