*** generic/tkTest.c.orig	Wed Jun 16 22:11:29 1999
--- generic/tkTest.c	Sun Jan 16 17:43:04 2000
***************
*** 16,27 ****
   * RCS: @(#) $Id: tkTest.c,v 1.6 1999/06/16 20:11:29 surles Exp $
   */
  
  #include "tkInt.h"
  #include "tkPort.h"
- #include "tkText.h"
  
  #ifdef __WIN32__
  #include "tkWinInt.h"
  #endif
  
  #ifdef MAC_TCL
--- 16,29 ----
   * RCS: @(#) $Id: tkTest.c,v 1.6 1999/06/16 20:11:29 surles Exp $
   */
  
+ #include "tk.h"
+ #include "tkText.h"
  #include "tkInt.h"
  #include "tkPort.h"
  
  #ifdef __WIN32__
  #include "tkWinInt.h"
+ #include "tkScrollbar.h"
  #endif
  
  #ifdef MAC_TCL
***************
*** 33,38 ****
--- 35,57 ----
  #endif
  
  /*
+  * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the
+  * Tktest_Init declaration is in the source file itself, which is only
+  * accessed when we are building a library.
+  */
+ 
+ #undef TCL_STORAGE_CLASS
+ #define TCL_STORAGE_CLASS DLLEXPORT
+ 
+ #ifdef __cplusplus
+ }
+ #define dummy  /* */
+ #define dummy2 /* */
+ #define dummy3 /* */
+ #define dummy4 /* */
+ #endif
+ 
+ /*
   * The following data structure represents the master for a test
   * image:
   */
***************
*** 97,116 ****
      struct NewApp *nextPtr;	/* Next in list of new interpreters. */
  } NewApp;
  
! static NewApp *newAppPtr = NULL;
  				/* First in list of all new interpreters. */
  
- /*
-  * Declaration for the square widget's class command procedure:
-  */
- 
- extern int SquareObjCmd _ANSI_ARGS_((ClientData clientData,
- 	Tcl_Interp *interp, int objc, Tcl_Obj * CONST objv[]));
  
  typedef struct CBinding {
      Tcl_Interp *interp;
      char *command;
!     char *delete;
  } CBinding;
  
  /*
--- 116,129 ----
      struct NewApp *nextPtr;	/* Next in list of new interpreters. */
  } NewApp;
  
! static NewApp *newAppPtr = (NewApp *) NULL;
  				/* First in list of all new interpreters. */
  
  
  typedef struct CBinding {
      Tcl_Interp *interp;
      char *command;
!     char *del;
  } CBinding;
  
  /*
***************
*** 147,153 ****
  			    Tcl_Interp *interp, XEvent *eventPtr,
  			    Tk_Window tkwin, KeySym keySym));
  static void		CBindingFreeProc _ANSI_ARGS_((ClientData clientData));
! int			Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp));
  static int		ImageCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int argc, char **argv));
  static int		TestcbindCmd _ANSI_ARGS_((ClientData dummy,
--- 160,166 ----
  			    Tcl_Interp *interp, XEvent *eventPtr,
  			    Tk_Window tkwin, KeySym keySym));
  static void		CBindingFreeProc _ANSI_ARGS_((ClientData clientData));
! EXTERN int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp));
  static int		ImageCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int argc, char **argv));
  static int		TestcbindCmd _ANSI_ARGS_((ClientData dummy,
***************
*** 165,171 ****
  			    Tcl_Interp *interp, int objc,
  			    Tcl_Obj * CONST objv[]));
  static int		TestdeleteappsCmd _ANSI_ARGS_((ClientData dummy,
! 			    Tcl_Interp *interp, int argc, char **argv));
  static int		TestfontObjCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int objc,
  			    Tcl_Obj *CONST objv[]));
--- 178,185 ----
  			    Tcl_Interp *interp, int objc,
  			    Tcl_Obj * CONST objv[]));
  static int		TestdeleteappsCmd _ANSI_ARGS_((ClientData dummy,
! 			    Tcl_Interp *interp, int objc,
! 			    Tcl_Obj * CONST objv[]));
  static int		TestfontObjCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int objc,
  			    Tcl_Obj *CONST objv[]));
***************
*** 181,194 ****
  			    Tcl_Interp *interp, int objc,
  			    Tcl_Obj * CONST objv[]));
  static int		TestpropCmd _ANSI_ARGS_((ClientData dummy,
! 			    Tcl_Interp *interp, int argc, char **argv));
  static int		TestsendCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int argc, char **argv));
  static int		TesttextCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int argc, char **argv));
  #if !(defined(__WIN32__) || defined(MAC_TCL))
  static int		TestwrapperCmd _ANSI_ARGS_((ClientData dummy,
! 			    Tcl_Interp *interp, int argc, char **argv));
  #endif
  static void		TrivialCmdDeletedProc _ANSI_ARGS_((
  			    ClientData clientData));
--- 195,210 ----
  			    Tcl_Interp *interp, int objc,
  			    Tcl_Obj * CONST objv[]));
  static int		TestpropCmd _ANSI_ARGS_((ClientData dummy,
! 			    Tcl_Interp *interp, int objc,
! 			    Tcl_Obj * CONST objv[]));
  static int		TestsendCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int argc, char **argv));
  static int		TesttextCmd _ANSI_ARGS_((ClientData dummy,
  			    Tcl_Interp *interp, int argc, char **argv));
  #if !(defined(__WIN32__) || defined(MAC_TCL))
  static int		TestwrapperCmd _ANSI_ARGS_((ClientData dummy,
! 			    Tcl_Interp *interp, int objc,
! 			    Tcl_Obj * CONST objv[]));
  #endif
  static void		TrivialCmdDeletedProc _ANSI_ARGS_((
  			    ClientData clientData));
***************
*** 202,213 ****
   * External (platform specific) initialization routine:
   */
  
- extern int		TkplatformtestInit _ANSI_ARGS_((
- 			    Tcl_Interp *interp));
- extern int              TclThread_Init _ANSI_ARGS_((Tcl_Interp *interp));
- 
  #if !(defined(__WIN32__) && defined(MAC_TCL))
  #define TkplatformtestInit(x) TCL_OK
  #endif
  
  /*
--- 218,228 ----
   * External (platform specific) initialization routine:
   */
  
  #if !(defined(__WIN32__) && defined(MAC_TCL))
  #define TkplatformtestInit(x) TCL_OK
+ #else
+ extern int		TkplatformtestInit _ANSI_ARGS_((
+ 			    Tcl_Interp *interp));
  #endif
  
  /*
***************
*** 229,236 ****
--- 244,256 ----
   */
  
  int
+ #ifdef _USING_PROTOTYPES_
+ Tktest_Init (
+     Tcl_Interp *interp)		/* Interpreter for application. */
+ #else
  Tktest_Init(interp)
      Tcl_Interp *interp;		/* Interpreter for application. */
+ #endif
  {
      static int initialized = 0;
  
***************
*** 238,249 ****
       * Create additional commands for testing Tk.
       */
  
      if (Tcl_PkgProvide(interp, "Tktest", TK_VERSION) == TCL_ERROR) {
          return TCL_ERROR;
      }
  
-     Tcl_CreateObjCommand(interp, "square", SquareObjCmd,
- 	    (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testcbind", TestcbindCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateObjCommand(interp, "testbitmap", TestbitmapObjCmd,
--- 258,273 ----
       * Create additional commands for testing Tk.
       */
  
+     if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+ 	return TCL_ERROR;
+     }
+     if (Tk_InitStubs(interp, TK_VERSION, 1) == NULL) {
+ 	return TCL_ERROR;
+     }
      if (Tcl_PkgProvide(interp, "Tktest", TK_VERSION) == TCL_ERROR) {
          return TCL_ERROR;
      }
  
      Tcl_CreateCommand(interp, "testcbind", TestcbindCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateObjCommand(interp, "testbitmap", TestbitmapObjCmd,
***************
*** 254,260 ****
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateObjCommand(interp, "testcursor", TestcursorObjCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
!     Tcl_CreateCommand(interp, "testdeleteapps", TestdeleteappsCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testembed", TkpTestembedCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
--- 278,284 ----
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateObjCommand(interp, "testcursor", TestcursorObjCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
!     Tcl_CreateObjCommand(interp, "testdeleteapps", TestdeleteappsCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testembed", TkpTestembedCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
***************
*** 270,291 ****
      Tcl_CreateCommand(interp, "testmetrics", TestmetricsCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
  #endif
!     Tcl_CreateCommand(interp, "testprop", TestpropCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testsend", TestsendCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testtext", TesttextCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
  #if !(defined(__WIN32__) || defined(MAC_TCL))
!     Tcl_CreateCommand(interp, "testwrapper", TestwrapperCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
  #endif
- 
- #ifdef TCL_THREADS
-     if (TclThread_Init(interp) != TCL_OK) {
- 	return TCL_ERROR;
-     }
- #endif
      
      /*
       * Create test image type.
--- 294,309 ----
      Tcl_CreateCommand(interp, "testmetrics", TestmetricsCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
  #endif
!     Tcl_CreateObjCommand(interp, "testprop", TestpropCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testsend", TestsendCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
      Tcl_CreateCommand(interp, "testtext", TesttextCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
  #if !(defined(__WIN32__) || defined(MAC_TCL))
!     Tcl_CreateObjCommand(interp, "testwrapper", TestwrapperCmd,
  	    (ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
  #endif
      
      /*
       * Create test image type.
***************
*** 321,331 ****
--- 339,357 ----
   */
  
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestcbindCmd (
+     ClientData clientData,		/* Main window for application. */
+     Tcl_Interp *interp,			/* Current interpreter. */
+     int argc,				/* Number of arguments. */
+     char **argv)			/* Argument strings. */
+ #else
  TestcbindCmd(clientData, interp, argc, argv)
      ClientData clientData;		/* Main window for application. */
      Tcl_Interp *interp;			/* Current interpreter. */
      int argc;				/* Number of arguments. */
      char **argv;			/* Argument strings. */
+ #endif
  {
      TkWindow *winPtr;
      Tk_Window tkwin;
***************
*** 362,370 ****
      cbindPtr->command =
  	    strcpy((char *) ckalloc(strlen(argv[3]) + 1), argv[3]);
      if (argc == 4) {
! 	cbindPtr->delete = NULL;
      } else {
! 	cbindPtr->delete =
  		strcpy((char *) ckalloc(strlen(argv[4]) + 1), argv[4]);
      }
  
--- 388,396 ----
      cbindPtr->command =
  	    strcpy((char *) ckalloc(strlen(argv[3]) + 1), argv[3]);
      if (argc == 4) {
! 	cbindPtr->del = NULL;
      } else {
! 	cbindPtr->del =
  		strcpy((char *) ckalloc(strlen(argv[4]) + 1), argv[4]);
      }
  
***************
*** 372,379 ****
  	    object, argv[2], CBindingEvalProc, CBindingFreeProc,
  	    (ClientData) cbindPtr) == 0) {
  	ckfree((char *) cbindPtr->command);
! 	if (cbindPtr->delete != NULL) {
! 	    ckfree((char *) cbindPtr->delete);
  	}
  	ckfree((char *) cbindPtr);
  	return TCL_ERROR;
--- 398,405 ----
  	    object, argv[2], CBindingEvalProc, CBindingFreeProc,
  	    (ClientData) cbindPtr) == 0) {
  	ckfree((char *) cbindPtr->command);
! 	if (cbindPtr->del != NULL) {
! 	    ckfree((char *) cbindPtr->del);
  	}
  	ckfree((char *) cbindPtr);
  	return TCL_ERROR;
***************
*** 382,393 ****
  }
  
  static int
! CBindingEvalProc(clientData, interp, eventPtr, tkwin, keySym)
      ClientData clientData;
      Tcl_Interp *interp;
!     XEvent *eventPtr;
!     Tk_Window tkwin;
!     KeySym keySym;
  {
      CBinding *cbindPtr;
  
--- 408,428 ----
  }
  
  static int
! #ifdef _USING_PROTOTYPES_
! CBindingEvalProc (
!     ClientData clientData,
!     Tcl_Interp *interp,
!     XEvent *dummy,
!     Tk_Window dummy2,
!     KeySym dummy3)
! #else
! CBindingEvalProc(clientData, interp, dummy, dummy2, dummy3)
      ClientData clientData;
      Tcl_Interp *interp;
!     XEvent *dummy;
!     Tk_Window dummy2;
!     KeySym dummy3;
! #endif
  {
      CBinding *cbindPtr;
  
***************
*** 397,410 ****
  }
  
  static void
  CBindingFreeProc(clientData)
      ClientData clientData;
  {
      CBinding *cbindPtr = (CBinding *) clientData;
      
!     if (cbindPtr->delete != NULL) {
! 	Tcl_GlobalEval(cbindPtr->interp, cbindPtr->delete);
! 	ckfree((char *) cbindPtr->delete);
      }
      ckfree((char *) cbindPtr->command);
      ckfree((char *) cbindPtr);
--- 432,450 ----
  }
  
  static void
+ #ifdef _USING_PROTOTYPES_
+ CBindingFreeProc (
+     ClientData clientData)
+ #else
  CBindingFreeProc(clientData)
      ClientData clientData;
+ #endif
  {
      CBinding *cbindPtr = (CBinding *) clientData;
      
!     if (cbindPtr->del != NULL) {
! 	Tcl_GlobalEval(cbindPtr->interp, cbindPtr->del);
! 	ckfree((char *) cbindPtr->del);
      }
      ckfree((char *) cbindPtr->command);
      ckfree((char *) cbindPtr);
***************
*** 429,439 ****
--- 469,487 ----
  
  	/* ARGSUSED */
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestbitmapObjCmd (
+     ClientData clientData,	/* Main window for application. */
+     Tcl_Interp *interp,		/* Current interpreter. */
+     int objc,			/* Number of arguments. */
+     Tcl_Obj *CONST objv[])	/* Argument objects. */
+ #else
  TestbitmapObjCmd(clientData, interp, objc, objv)
      ClientData clientData;	/* Main window for application. */
      Tcl_Interp *interp;		/* Current interpreter. */
      int objc;			/* Number of arguments. */
      Tcl_Obj *CONST objv[];	/* Argument objects. */
+ #endif
  {
  
      if (objc < 2) {
***************
*** 464,474 ****
--- 512,530 ----
  
  	/* ARGSUSED */
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestborderObjCmd (
+     ClientData clientData,	/* Main window for application. */
+     Tcl_Interp *interp,		/* Current interpreter. */
+     int objc,			/* Number of arguments. */
+     Tcl_Obj *CONST objv[])	/* Argument objects. */
+ #else
  TestborderObjCmd(clientData, interp, objc, objv)
      ClientData clientData;	/* Main window for application. */
      Tcl_Interp *interp;		/* Current interpreter. */
      int objc;			/* Number of arguments. */
      Tcl_Obj *CONST objv[];	/* Argument objects. */
+ #endif
  {
  
      if (objc < 2) {
***************
*** 499,509 ****
--- 555,573 ----
  
  	/* ARGSUSED */
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestcolorObjCmd (
+     ClientData clientData,	/* Main window for application. */
+     Tcl_Interp *interp,		/* Current interpreter. */
+     int objc,			/* Number of arguments. */
+     Tcl_Obj *CONST objv[])	/* Argument objects. */
+ #else
  TestcolorObjCmd(clientData, interp, objc, objv)
      ClientData clientData;	/* Main window for application. */
      Tcl_Interp *interp;		/* Current interpreter. */
      int objc;			/* Number of arguments. */
      Tcl_Obj *CONST objv[];	/* Argument objects. */
+ #endif
  {
  
      if (objc < 2) {
***************
*** 534,544 ****
--- 598,616 ----
  
  	/* ARGSUSED */
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestcursorObjCmd (
+     ClientData clientData,	/* Main window for application. */
+     Tcl_Interp *interp,		/* Current interpreter. */
+     int objc,			/* Number of arguments. */
+     Tcl_Obj *CONST objv[])	/* Argument objects. */
+ #else
  TestcursorObjCmd(clientData, interp, objc, objv)
      ClientData clientData;	/* Main window for application. */
      Tcl_Interp *interp;		/* Current interpreter. */
      int objc;			/* Number of arguments. */
      Tcl_Obj *CONST objv[];	/* Argument objects. */
+ #endif
  {
  
      if (objc < 2) {
***************
*** 570,580 ****
  
  	/* ARGSUSED */
  static int
! TestdeleteappsCmd(clientData, interp, argc, argv)
!     ClientData clientData;		/* Main window for application. */
!     Tcl_Interp *interp;			/* Current interpreter. */
!     int argc;				/* Number of arguments. */
!     char **argv;			/* Argument strings. */
  {
      NewApp *nextPtr;
  
--- 642,660 ----
  
  	/* ARGSUSED */
  static int
! #ifdef _USING_PROTOTYPES_
! TestdeleteappsCmd (
!     ClientData dummy,			/* Main window for application. */
!     Tcl_Interp *dummy2,			/* Current interpreter. */
!     int dummy3,				/* Number of arguments. */
!     Tcl_Obj *CONST dummy4[])		/* Argument strings. */
! #else
! TestdeleteappsCmd(dummy, dummy2, dummy3, dummy4)
!     ClientData dummy;			/* Main window for application. */
!     Tcl_Interp *dummy2;			/* Current interpreter. */
!     int dummy3;				/* Number of arguments. */
!     Tcl_Obj *CONST *dummy4[];		/* Argument strings. */
! #endif
  {
      NewApp *nextPtr;
  
***************
*** 1579,1585 ****
  	if (strcmp(argv[i], "-variable") != 0) {
  	    Tcl_AppendResult(interp, "bad option name \"", argv[i],
  		    "\"", (char *) NULL);
- 	    return TCL_ERROR;
  	}
  	if ((i+1) == argc) {
  	    Tcl_AppendResult(interp, "no value given for \"", argv[i],
--- 1659,1664 ----
***************
*** 1660,1665 ****
--- 1739,1746 ----
  		"\": must be changed", (char *) NULL);
  	return TCL_ERROR;
      }
+     Tk_ImageChanged(timPtr->master, x, y, width, height, timPtr->width,
+ 	    timPtr->height);
      return TCL_OK;
  }
  
***************
*** 1682,1691 ****
--- 1763,1779 ----
   */
  
  static ClientData
+ #ifdef _USING_PROTOTYPES_
+ ImageGet (
+     Tk_Window tkwin,		/* Token for window in which image will
+ 				 * be used. */
+     ClientData clientData)	/* Pointer to TImageMaster for image. */
+ #else
  ImageGet(tkwin, clientData)
      Tk_Window tkwin;		/* Token for window in which image will
  				 * be used. */
      ClientData clientData;	/* Pointer to TImageMaster for image. */
+ #endif
  {
      TImageMaster *timPtr = (TImageMaster *) clientData;
      TImageInstance *instPtr;
***************
*** 1723,1728 ****
--- 1811,1827 ----
   */
  
  static void
+ #ifdef _USING_PROTOTYPES_
+ ImageDisplay (
+     ClientData clientData,	/* Pointer to TImageInstance for image. */
+     Display *display,		/* Display to use for drawing. */
+     Drawable drawable,		/* Where to redraw image. */
+     int imageX, int imageY,	/* Origin of area to redraw, relative to
+ 				 * origin of image. */
+     int width, int height,	/* Dimensions of area to redraw. */
+     int drawableX,		/* Coordinates in drawable corresponding to */
+     int drawableY)		/* imageX and imageY. */
+ #else
  ImageDisplay(clientData, display, drawable, imageX, imageY, width, height,
  	drawableX, drawableY)
      ClientData clientData;	/* Pointer to TImageInstance for image. */
***************
*** 1733,1738 ****
--- 1832,1838 ----
      int width, height;		/* Dimensions of area to redraw. */
      int drawableX, drawableY;	/* Coordinates in drawable corresponding to
  				 * imageX and imageY. */
+ #endif
  {
      TImageInstance *instPtr = (TImageInstance *) clientData;
      char buffer[200 + TCL_INTEGER_SPACE * 6];
***************
*** 1775,1783 ****
--- 1875,1889 ----
   */
  
  static void
+ #ifdef _USING_PROTOTYPES_
+ ImageFree (
+     ClientData clientData,	/* Pointer to TImageInstance for instance. */
+     Display *display)		/* Display where image was to be drawn. */
+ #else
  ImageFree(clientData, display)
      ClientData clientData;	/* Pointer to TImageInstance for instance. */
      Display *display;		/* Display where image was to be drawn. */
+ #endif
  {
      TImageInstance *instPtr = (TImageInstance *) clientData;
      char buffer[200];
***************
*** 1808,1817 ****
--- 1914,1930 ----
   */
  
  static void
+ #ifdef _USING_PROTOTYPES_
+ ImageDelete (
+     ClientData clientData)	/* Pointer to TImageMaster for image.  When
+ 				 * this procedure is called, no more
+ 				 * instances exist. */
+ #else
  ImageDelete(clientData)
      ClientData clientData;	/* Pointer to TImageMaster for image.  When
  				 * this procedure is called, no more
  				 * instances exist. */
+ #endif
  {
      TImageMaster *timPtr = (TImageMaster *) clientData;
      char buffer[100];
***************
*** 2040,2050 ****
  
  	/* ARGSUSED */
  static int
  TestpropCmd(clientData, interp, argc, argv)
      ClientData clientData;		/* Main window for application. */
      Tcl_Interp *interp;			/* Current interpreter. */
      int argc;				/* Number of arguments. */
!     char **argv;			/* Argument strings. */
  {
      Tk_Window mainWin = (Tk_Window) clientData;
      int result, actualFormat;
--- 2153,2171 ----
  
  	/* ARGSUSED */
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestpropCmd (
+     ClientData clientData,		/* Main window for application. */
+     Tcl_Interp *interp,			/* Current interpreter. */
+     int argc,				/* Number of arguments. */
+     Tcl_Obj *CONST argv[])		/* Argument objects. */
+ #else
  TestpropCmd(clientData, interp, argc, argv)
      ClientData clientData;		/* Main window for application. */
      Tcl_Interp *interp;			/* Current interpreter. */
      int argc;				/* Number of arguments. */
!     Tcl_Obj *CONST argv[];		/* Argument objects. */
! #endif
  {
      Tk_Window mainWin = (Tk_Window) clientData;
      int result, actualFormat;
***************
*** 2055,2067 ****
      char buffer[30];
  
      if (argc != 3) {
! 	Tcl_AppendResult(interp, "wrong # args;  must be \"", argv[0],
  		" window property\"", (char *) NULL);
  	return TCL_ERROR;
      }
  
!     w = strtoul(argv[1], &end, 0);
!     propName = Tk_InternAtom(mainWin, argv[2]);
      property = NULL;
      result = XGetWindowProperty(Tk_Display(mainWin),
  	    w, propName, 0, 100000, False, AnyPropertyType,
--- 2176,2188 ----
      char buffer[30];
  
      if (argc != 3) {
! 	Tcl_AppendResult(interp, "wrong # args;  must be \"", Tcl_GetString(argv[0]),
  		" window property\"", (char *) NULL);
  	return TCL_ERROR;
      }
  
!     w = strtoul(Tcl_GetString(argv[1]), &end, 0);
!     propName = Tk_InternAtom(mainWin, Tcl_GetString(argv[2]));
      property = NULL;
      result = XGetWindowProperty(Tk_Display(mainWin),
  	    w, propName, 0, 100000, False, AnyPropertyType,
***************
*** 2307,2329 ****
  
  	/* ARGSUSED */
  static int
  TestwrapperCmd(clientData, interp, argc, argv)
      ClientData clientData;		/* Main window for application. */
      Tcl_Interp *interp;			/* Current interpreter. */
      int argc;				/* Number of arguments. */
!     char **argv;			/* Argument strings. */
  {
      TkWindow *winPtr, *wrapperPtr;
      Tk_Window tkwin;
  
      if (argc != 2) {
! 	Tcl_AppendResult(interp, "wrong # args;  must be \"", argv[0],
! 		" window\"", (char *) NULL);
  	return TCL_ERROR;
      }
      
      tkwin = (Tk_Window) clientData;
!     winPtr = (TkWindow *) Tk_NameToWindow(interp, argv[1], tkwin);
      if (winPtr == NULL) {
  	return TCL_ERROR;
      }
--- 2428,2457 ----
  
  	/* ARGSUSED */
  static int
+ #ifdef _USING_PROTOTYPES_
+ TestwrapperCmd (
+     ClientData clientData,		/* Main window for application. */
+     Tcl_Interp *interp,			/* Current interpreter. */
+     int argc,				/* Number of arguments. */
+     Tcl_Obj *CONST argv[])		/* Argument objects. */
+ #else
  TestwrapperCmd(clientData, interp, argc, argv)
      ClientData clientData;		/* Main window for application. */
      Tcl_Interp *interp;			/* Current interpreter. */
      int argc;				/* Number of arguments. */
!     Tcl_Obj *CONST argv[];		/* Argument strings. */
! #endif
  {
      TkWindow *winPtr, *wrapperPtr;
      Tk_Window tkwin;
  
      if (argc != 2) {
! 	Tcl_WrongNumArgs(interp, 1, argv, "window");
  	return TCL_ERROR;
      }
      
      tkwin = (Tk_Window) clientData;
!     winPtr = (TkWindow *) Tk_NameToWindow(interp, Tcl_GetStringFromObj(argv[1], NULL), tkwin);
      if (winPtr == NULL) {
  	return TCL_ERROR;
      }
