diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2018-09-23 08:22:06 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2018-09-23 08:22:06 (GMT) |
commit | fb7684c13d6454994b19e3793f455c31720eda0a (patch) | |
tree | 577af1b7b397a97b4fa9940f715dcf65c1b85b86 /generic/tkFrame.c | |
parent | dbae6fd8e676c40daac803ac99de1368c9d229a8 (diff) | |
parent | ab9ffd9526cfa22dbb5c74f1b8140e1d6d7eadf1 (diff) | |
download | tk-fb7684c13d6454994b19e3793f455c31720eda0a.zip tk-fb7684c13d6454994b19e3793f455c31720eda0a.tar.gz tk-fb7684c13d6454994b19e3793f455c31720eda0a.tar.bz2 |
Merge trunk
Diffstat (limited to 'generic/tkFrame.c')
-rw-r--r-- | generic/tkFrame.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c index f6edfb0..1ed3268 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -12,8 +12,8 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include "default.h" #include "tkInt.h" +#include "default.h" /* * The following enum is used to define the type of the frame. @@ -458,7 +458,6 @@ TkListCreateFrame( * window associated with the interpreter. * Gives the base name to use for the new * application. */ - { int objc; Tcl_Obj **objv; @@ -489,7 +488,8 @@ CreateFrame( Tk_Window newWin; const char *className, *screenName, *visualName, *colormapName; const char *arg, *useOption; - int i, length, depth; + int i, depth; + size_t length; unsigned int mask; Colormap colormap; Visual *visual; @@ -516,24 +516,24 @@ CreateFrame( className = colormapName = screenName = visualName = useOption = NULL; colormap = None; for (i = 2; i < objc; i += 2) { - arg = Tcl_GetStringFromObj(objv[i], &length); + arg = TkGetStringFromObj(objv[i], &length); if (length < 2) { continue; } if ((arg[1] == 'c') && (length >= 3) - && (strncmp(arg, "-class", (unsigned) length) == 0)) { + && (strncmp(arg, "-class", length) == 0)) { className = Tcl_GetString(objv[i+1]); } else if ((arg[1] == 'c') && (length >= 3) - && (strncmp(arg, "-colormap", (unsigned) length) == 0)) { + && (strncmp(arg, "-colormap", length) == 0)) { colormapName = Tcl_GetString(objv[i+1]); } else if ((arg[1] == 's') && (type == TYPE_TOPLEVEL) - && (strncmp(arg, "-screen", (unsigned) length) == 0)) { + && (strncmp(arg, "-screen", length) == 0)) { screenName = Tcl_GetString(objv[i+1]); } else if ((arg[1] == 'u') && (type == TYPE_TOPLEVEL) - && (strncmp(arg, "-use", (unsigned) length) == 0)) { + && (strncmp(arg, "-use", length) == 0)) { useOption = Tcl_GetString(objv[i+1]); } else if ((arg[1] == 'v') - && (strncmp(arg, "-visual", (unsigned) length) == 0)) { + && (strncmp(arg, "-visual", length) == 0)) { visualName = Tcl_GetString(objv[i+1]); } } @@ -744,7 +744,8 @@ FrameWidgetObjCmd( }; register Frame *framePtr = clientData; int result = TCL_OK, index; - int c, i, length; + int c, i; + size_t length; Tcl_Obj *objPtr; if (objc < 2) { @@ -788,7 +789,7 @@ FrameWidgetObjCmd( */ for (i = 2; i < objc; i++) { - const char *arg = Tcl_GetStringFromObj(objv[i], &length); + const char *arg = TkGetStringFromObj(objv[i], &length); if (length < 2) { continue; |