*** generic/tkSquare.c.orig	Fri Apr 16 03:51:22 1999
--- generic/tkSquare.c	Sun Jan 16 17:43:04 2000
***************
*** 15,25 ****
--- 15,42 ----
   * RCS: @(#) $Id: tkSquare.c,v 1.3 1999/04/16 01:51:22 stanton Exp $
   */
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  #include "tkPort.h"
  #define __NO_OLD_CONFIG
  #include "tk.h"
  #include "tkInt.h"
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
+ /*
+  * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the
+  * Tksquare_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
+ 
  /*
   * A data structure of the following type is kept for each square
   * widget managed by this file:
***************
*** 107,112 ****
--- 124,178 ----
  static int		SquareWidgetCmd _ANSI_ARGS_((ClientData clientData,
  			    Tcl_Interp *, int objc, Tcl_Obj * CONST objv[]));
  
+ /*
+  *----------------------------------------------------------------------
+  *
+  * Tksquare_Init --
+  *
+  *	This procedure performs intialization for the Tk square
+  *	exension.
+  *
+  * Results:
+  *	Returns a standard Tcl completion code, and leaves an error
+  *	message in interp->result if an error occurs.
+  *
+  * Side effects:
+  *	Creates several test commands.
+  *
+  *----------------------------------------------------------------------
+  */
+ 
+ EXTERN Tksquare_Init _ANSI_ARGS_((Tcl_Interp *interp));
+ 
+ int
+ #ifdef _USING_PROTOTYPES_
+ Tksquare_Init (
+     Tcl_Interp *interp)		/* Interpreter for application. */
+ #else
+ Tksquare_Init(interp)
+     Tcl_Interp *interp;		/* Interpreter for application. */
+ #endif
+ {
+     /*
+      * Create the square command.
+      */
+ 
+     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, "Tksquare", TK_VERSION) != TCL_OK) {
+ 	return TCL_ERROR;
+     }
+ 
+     Tcl_CreateObjCommand(interp, "square", SquareObjCmd,
+ 	    (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+ 
+     return TCL_OK;
+ }
+ 
  /*
   *--------------------------------------------------------------
   *
