1212 * See the file "license.terms" for information on usage and redistribution
1313 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1414 *
15- * RCS: @(#) $Id: tkFrame.c,v 1.15.2.2 2005/07/28 04:57:37 hobbs Exp $
15+ * RCS: @(#) $Id: tkFrame.c,v 1.15.2.3 2005/08/11 12:17:09 dkf Exp $
1616 */
1717
1818#include "default.h"
@@ -485,8 +485,7 @@ CreateFrame(clientData, interp, objc, objv, type, appName)
485485 Tk_OptionTable optionTable ;
486486 Tk_Window new ;
487487 CONST char * className , * screenName , * visualName , * colormapName , * arg , * useOption ;
488- int i , c , depth ;
489- size_t length ;
488+ int i , c , depth , length ;
490489 unsigned int mask ;
491490 Colormap colormap ;
492491 Visual * visual ;
@@ -513,25 +512,25 @@ CreateFrame(clientData, interp, objc, objv, type, appName)
513512 className = colormapName = screenName = visualName = useOption = NULL ;
514513 colormap = None ;
515514 for (i = 2 ; i < objc ; i += 2 ) {
516- arg = Tcl_GetStringFromObj (objv [i ], ( int * ) & length );
515+ arg = Tcl_GetStringFromObj (objv [i ], & length );
517516 if (length < 2 ) {
518517 continue ;
519518 }
520519 c = arg [1 ];
521- if ((c == 'c' ) && (strncmp (arg , "-class" , length ) == 0 )
520+ if ((c == 'c' ) && (strncmp (arg , "-class" , ( unsigned ) length ) == 0 )
522521 && (length >= 3 )) {
523522 className = Tcl_GetString (objv [i + 1 ]);
524523 } else if ((c == 'c' )
525- && (strncmp (arg , "-colormap" , length ) == 0 )) {
524+ && (strncmp (arg , "-colormap" , ( unsigned ) length ) == 0 )) {
526525 colormapName = Tcl_GetString (objv [i + 1 ]);
527526 } else if ((c == 's' ) && (type == TYPE_TOPLEVEL )
528- && (strncmp (arg , "-screen" , length ) == 0 )) {
527+ && (strncmp (arg , "-screen" , ( unsigned ) length ) == 0 )) {
529528 screenName = Tcl_GetString (objv [i + 1 ]);
530529 } else if ((c == 'u' ) && (type == TYPE_TOPLEVEL )
531- && (strncmp (arg , "-use" , length ) == 0 )) {
530+ && (strncmp (arg , "-use" , ( unsigned ) length ) == 0 )) {
532531 useOption = Tcl_GetString (objv [i + 1 ]);
533532 } else if ((c == 'v' )
534- && (strncmp (arg , "-visual" , length ) == 0 )) {
533+ && (strncmp (arg , "-visual" , ( unsigned ) length ) == 0 )) {
535534 visualName = Tcl_GetString (objv [i + 1 ]);
536535 }
537536 }
@@ -735,8 +734,7 @@ FrameWidgetObjCmd(clientData, interp, objc, objv)
735734 };
736735 register Frame * framePtr = (Frame * ) clientData ;
737736 int result = TCL_OK , index ;
738- size_t length ;
739- int c , i ;
737+ int c , i , length ;
740738 Tcl_Obj * objPtr ;
741739
742740 if (objc < 2 ) {
@@ -784,25 +782,26 @@ FrameWidgetObjCmd(clientData, interp, objc, objv)
784782 */
785783
786784 for (i = 2 ; i < objc ; i ++ ) {
787- char * arg = Tcl_GetStringFromObj (objv [i ], ( int * ) & length );
785+ char * arg = Tcl_GetStringFromObj (objv [i ], & length );
788786 if (length < 2 ) {
789787 continue ;
790788 }
791789 c = arg [1 ];
792- if (((c == 'c' ) && (strncmp (arg , "-class" , length ) == 0 )
790+ if (((c == 'c' )
791+ && (strncmp (arg , "-class" , (unsigned ) length ) == 0 )
793792 && (length >= 2 ))
794793 || ((c == 'c' )
795- && (strncmp (arg , "-colormap" , length ) == 0 )
794+ && (strncmp (arg , "-colormap" , ( unsigned ) length ) == 0 )
796795 && (length >= 3 ))
797796 || ((c == 'c' )
798- && (strncmp (arg , "-container" , length ) == 0 )
797+ && (strncmp (arg , "-container" , ( unsigned ) length ) == 0 )
799798 && (length >= 3 ))
800799 || ((c == 's' ) && (framePtr -> type == TYPE_TOPLEVEL )
801- && (strncmp (arg , "-screen" , length ) == 0 ))
800+ && (strncmp (arg , "-screen" , ( unsigned ) length ) == 0 ))
802801 || ((c == 'u' ) && (framePtr -> type == TYPE_TOPLEVEL )
803- && (strncmp (arg , "-use" , length ) == 0 ))
802+ && (strncmp (arg , "-use" , ( unsigned ) length ) == 0 ))
804803 || ((c == 'v' )
805- && (strncmp (arg , "-visual" , length ) == 0 ))) {
804+ && (strncmp (arg , "-visual" , ( unsigned ) length ) == 0 ))) {
806805 Tcl_AppendResult (interp , "can't modify " , arg ,
807806 " option after widget is created" , (char * ) NULL );
808807 result = TCL_ERROR ;
0 commit comments