diff options
author | hobbs <hobbs> | 2002-02-22 21:07:23 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-02-22 21:07:23 (GMT) |
commit | f9629fc1524f08373dd4a4f5be5dbb567e9f0bac (patch) | |
tree | 1736c6ca9fcc94de4dd7a973168e9f8ac2fae721 | |
parent | a1a126eaeb09fc26d8e29cd7a518a26cf5509954 (diff) | |
download | tk-f9629fc1524f08373dd4a4f5be5dbb567e9f0bac.zip tk-f9629fc1524f08373dd4a4f5be5dbb567e9f0bac.tar.gz tk-f9629fc1524f08373dd4a4f5be5dbb567e9f0bac.tar.bz2 |
* generic/tkPanedWindow.c (PanedWindowWidgetObjCmd): fixed returns
that should have been breaks instead. Corrected .pw configure
handling for insufficient args. [Patch #521436] (boudaillier)
-rw-r--r-- | generic/tkPanedWindow.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index d3a64b5..6c38ac5 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkPanedWindow.c,v 1.1 2002/02/22 02:41:17 hobbs Exp $ + * RCS: @(#) $Id: tkPanedWindow.c,v 1.2 2002/02/22 21:07:23 hobbs Exp $ */ #include "tkPort.h" @@ -534,7 +534,7 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv) break; } - return ConfigureSlaves(pwPtr, interp, objc, objv); + result = ConfigureSlaves(pwPtr, interp, objc, objv); break; } @@ -579,7 +579,8 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv) if (objc < 3) { Tcl_WrongNumArgs(interp, 2, objv, "widget ?widget ...?"); - return TCL_ERROR; + result = TCL_ERROR; + break; } /* @@ -616,15 +617,13 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv) break; } - if (Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) { - return TCL_ERROR; - } - - if (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK) { - return TCL_ERROR; + if ((Tcl_GetIntFromObj(interp, objv[2], &x) != TCL_OK) + || (Tcl_GetIntFromObj(interp, objv[3], &y) != TCL_OK)) { + result = TCL_ERROR; + break; } - return PanedWindowIdentifyCoords(pwPtr, interp, x, y); + result = PanedWindowIdentifyCoords(pwPtr, interp, x, y); break; } @@ -661,6 +660,12 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv) } case PW_PANECONFIGURE: { + if (objc < 3) { + Tcl_WrongNumArgs(interp, 2, objv, + "pane ?option? ?value option value ...?"); + result = TCL_ERROR; + break; + } resultObj = NULL; if (objc <= 4) { tkwin = Tk_NameToWindow(interp, Tcl_GetString(objv[2]), @@ -702,12 +707,12 @@ PanedWindowWidgetObjCmd(clientData, interp, objc, objv) } case PW_PROXY: { - return PanedWindowProxyCommand(pwPtr, interp, objc, objv); + result = PanedWindowProxyCommand(pwPtr, interp, objc, objv); break; } case PW_SASH: { - return PanedWindowSashCommand(pwPtr, interp, objc, objv); + result = PanedWindowSashCommand(pwPtr, interp, objc, objv); break; } } |